source: abuse/trunk/src/include/nfserver.hpp @ 56

Last change on this file since 56 was 56, checked in by Sam Hocevar, 14 years ago
  • Add licensing terms to most C / C++ files (Ref #5).
File size: 1.5 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Crack dot Com or
7 *  Jonathan Clark.
8 */
9
10#ifndef __NFSERVER_HPP_
11#define __NFSERVER_HPP_
12
13#include "specs.hpp"
14#include "system.h"
15#include "netface.hpp"
16#include "sock.hpp"
17
18int net_init(int argc, char **argv);
19void net_uninit();
20void service_net_request();
21void wait_min_players();
22void server_check();
23void remove_client(int client_number);
24
25int net_start();
26bFILE *open_nfs_file(char const *filename, char const *mode);
27
28int net_init(int argc, char **argv);
29int NF_open_file(char const *filename, char const *mode);
30long NF_close(int fd);
31long NF_read(int fd, void *buf, long size);
32long NF_filelength(int fd);
33long NF_tell(int fd);
34long NF_seek(int fd, long offset);
35int NF_set_file_server(net_address *addr);
36
37int request_server_entry();
38int server_entry_continue();
39void net_reload();
40void read_new_views();
41int set_file_server(char const *name);
42int set_file_server(net_address *addr);
43
44int join_remote_game(char *name);
45int become_server(char *name);
46int get_remote_lsf(net_address *addr, char *filename);   // filename should be 256 bytes
47
48
49void send_local_request();                          // sends from *base
50int get_inputs_from_server(unsigned char *buf);     // return bytes read into buf (will be less than PACKET_MAX_SIZE
51
52
53int client_number();
54extern net_address *net_server;
55extern base_memory_struct *base;   // points to shm_addr
56
57#endif
Note: See TracBrowser for help on using the repository browser.