Last change
on this file since 17 was
2,
checked in by Sam Hocevar, 18 years ago
|
- imported original 0.7.0 tarball
|
File size:
987 bytes
|
Line | |
---|
1 | #ifndef __GHANDLER_HPP_ |
---|
2 | #define __GHANDLER_HPP_ |
---|
3 | |
---|
4 | #include "netface.hpp" |
---|
5 | |
---|
6 | |
---|
7 | #define DEFAULT_COMM_PORT 20202 |
---|
8 | #define DEFAULT_GAME_PORT 20203 |
---|
9 | |
---|
10 | |
---|
11 | extern base_memory_struct *base; |
---|
12 | |
---|
13 | class game_handler // game_client and game_serevr are derived from here |
---|
14 | { |
---|
15 | public : |
---|
16 | virtual int process_net() { return 1; } // return 0 if net-shutdown need to happen |
---|
17 | virtual void add_engine_input() { base->input_state=INPUT_PROCESSING; } |
---|
18 | virtual int input_missing() { return 1; } // request input re-send ( return 0 if net-shutdown needs to happen) |
---|
19 | virtual int start_reload() { return 1; } |
---|
20 | virtual int end_reload(int disconenct=0) { return 1; } |
---|
21 | virtual int add_client(int type, net_socket *sock, net_address *from) { return 0; } |
---|
22 | virtual int kill_slackers() { return 1; } |
---|
23 | virtual int quit() { return 1; } // should disconnect from everone and close all sockets |
---|
24 | virtual void game_start_wait() { ; } |
---|
25 | virtual ~game_handler() { ; } |
---|
26 | } ; |
---|
27 | |
---|
28 | #endif |
---|
29 | |
---|
30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.