Last change
on this file since 9390 was
9386,
checked in by bensch, 18 years ago
|
orxonox/proxy: removed the dependency of the netdefs in pnode, which should decrease compile time enormously.
|
File size:
1.7 KB
|
Line | |
---|
1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: Christoph Renner rennerc@ee.ethz.ch |
---|
13 | co-programmer: Patrick Boenzli boenzlip@orxonox.ethz.ch |
---|
14 | |
---|
15 | June 2006: finishing work on the network stream for pps presentation (rennerc@ee.ethz.ch) |
---|
16 | July 2006: some code rearangement and integration of the proxy server mechanism (boenzlip@ee.ethz.ch) |
---|
17 | */ |
---|
18 | |
---|
19 | /*! |
---|
20 | * @file network_manager.h |
---|
21 | * Main interface for the network module. Manages all the modules |
---|
22 | */ |
---|
23 | |
---|
24 | #ifndef _NETDEFS_H |
---|
25 | #define _NETDEFS_H |
---|
26 | |
---|
27 | #include "net_types.h" |
---|
28 | |
---|
29 | #ifdef HAVE_SDL_NET_H |
---|
30 | #include <SDL_net.h> |
---|
31 | #else |
---|
32 | #include <SDL/SDL_net.h> |
---|
33 | #endif |
---|
34 | |
---|
35 | |
---|
36 | |
---|
37 | |
---|
38 | //!< the amount of slots used before a proxy server is activated |
---|
39 | #define NET_CONNECTION_SATURATION 0.75 |
---|
40 | |
---|
41 | //!< network polling frequency |
---|
42 | #define NETWORK_FREQUENCY 66 |
---|
43 | |
---|
44 | |
---|
45 | //!< orxonox protocol id |
---|
46 | #define _ORXONOX_ID 0xF91337A0 |
---|
47 | //!< orxonox network version identifier |
---|
48 | #define _ORXONOX_VERSION 1 |
---|
49 | |
---|
50 | |
---|
51 | //!< enum indicating the type of the node |
---|
52 | typedef enum { |
---|
53 | NET_MASTER_SERVER, |
---|
54 | NET_PROXY_SERVER_ACTIVE, |
---|
55 | NET_PROXY_SERVER_PASSIVE, |
---|
56 | NET_CLIENT, |
---|
57 | |
---|
58 | NET_NR_TYPES |
---|
59 | |
---|
60 | } NodeType; |
---|
61 | |
---|
62 | //!< enum indicating the type of the network connection (2 protocols supported) |
---|
63 | typedef enum ConnectionType { |
---|
64 | NET_UDP = 0, |
---|
65 | NET_TCP |
---|
66 | }; |
---|
67 | |
---|
68 | //!< the type of the user id (special number never used elsewhere) |
---|
69 | typedef enum { |
---|
70 | NET_UID_UNASSIGNED = -1, |
---|
71 | |
---|
72 | NET_UID_NUMBER |
---|
73 | } UidType; |
---|
74 | |
---|
75 | #endif /* _NETDEFS_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.