source:
orxonox.OLD/branches/proxy/src/lib/network/netdefs.h
@
9248
Last change on this file since 9248 was 9248, checked in by patrick, 18 years ago | |
---|---|
File size: 769 bytes |
Rev | Line | |
---|---|---|
[5530] | 1 | |
2 | ||
3 | /*! | |
4 | * @file network_manager.h | |
5 | * Main interface for the network module. Manages all the modules | |
6 | ||
7 | */ | |
8 | ||
[5624] | 9 | #ifndef _NETDEFS |
10 | #define _NETDEFS | |
[5530] | 11 | |
[5588] | 12 | #ifdef HAVE_SDL_NET_H |
[5605] | 13 | #include <SDL_net.h> |
[5588] | 14 | #else |
[5605] | 15 | #include <SDL/SDL_net.h> |
[5588] | 16 | #endif |
17 | ||
[5605] | 18 | |
[6695] | 19 | #define MAX_CONNECTIONS 1000 |
20 | ||
[8802] | 21 | #define NETWORK_FREQUENCY 66 |
[6695] | 22 | |
[7954] | 23 | |
[5530] | 24 | typedef unsigned char byte; |
25 | ||
26 | ||
[9246] | 27 | //!< enum indicating the type of the node |
[5649] | 28 | typedef enum { |
[9248] | 29 | NET_MASTER_SERVER, |
30 | NET_PROXY_SERVER, | |
31 | NET_CLIENT, | |
32 | ||
33 | NET_NR_TYPES | |
34 | ||
[5649] | 35 | } NodeType; |
36 | ||
[9246] | 37 | //!< enum indicating the type of the network connection (2 protocols supported) |
[7954] | 38 | typedef enum ConnectionType { |
39 | NET_UDP = 0, | |
40 | NET_TCP | |
41 | }; | |
[6695] | 42 | |
[9246] | 43 | //!< the type of the user id (special number never used elsewhere) |
[6695] | 44 | typedef enum { |
45 | NET_UID_UNASSIGNED = -1, | |
46 | ||
47 | NET_UID_NUMBER | |
48 | } UidType; | |
49 | ||
[5530] | 50 | #endif /* _NETWORK_MANAGER */ |
Note: See TracBrowser
for help on using the repository browser.