source: abuse/trunk/src/nfserver.hpp @ 97

Last change on this file since 97 was 58, checked in by Sam Hocevar, 11 years ago
  • Remove a few duplicate prototype declarations.
  • Add some harmless "%s" in sprintf() calls.
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 NF_open_file(char const *filename, char const *mode);
29long NF_close(int fd);
30long NF_read(int fd, void *buf, long size);
31long NF_filelength(int fd);
32long NF_tell(int fd);
33long NF_seek(int fd, long offset);
34int NF_set_file_server(net_address *addr);
35
36int request_server_entry();
37int server_entry_continue();
38void net_reload();
39void read_new_views();
40int set_file_server(char const *name);
41int set_file_server(net_address *addr);
42
43int join_remote_game(char *name);
44int become_server(char *name);
45int get_remote_lsf(net_address *addr, char *filename);   // filename should be 256 bytes
46
47
48void send_local_request();                          // sends from *base
49int get_inputs_from_server(unsigned char *buf);     // return bytes read into buf (will be less than PACKET_MAX_SIZE
50
51
52int client_number();
53extern net_address *net_server;
54extern base_memory_struct *base;   // points to shm_addr
55
56#endif
Note: See TracBrowser for help on using the repository browser.