Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/network/netdefs.h @ 9304

Last change on this file since 9304 was 9304, checked in by bensch, 18 years ago

orxonox/trunk: virtual public and an ip class

File size: 1.7 KB
RevLine 
[9253]1/*
2   orxonox - the future of 3D-vertical-scrollers
[5530]3
[9253]4   Copyright (C) 2004 orx
[5530]5
[9253]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
[5530]19/*!
20 * @file network_manager.h
21 *  Main interface for the network module. Manages all the modules
22 */
23
[5624]24#ifndef _NETDEFS
25#define _NETDEFS
[5530]26
[5588]27#ifdef HAVE_SDL_NET_H
[5605]28  #include <SDL_net.h>
[5588]29#else
[5605]30  #include <SDL/SDL_net.h>
[5588]31#endif
32
[5605]33
[9300]34//!< maximal connectinons for the server
[9290]35#define NET_MAX_CONNECTIONS 5
[6695]36
[9300]37//!< the amount of slots used before a proxy server is activated
38#define NET_CONNECTION_SATURATION 0.75
39
40//!< network polling frequency
[8802]41#define NETWORK_FREQUENCY 66
[6695]42
[7954]43
[9300]44//!< orxonox protocol id
[9263]45#define _ORXONOX_ID        0xF91337A0
[9300]46//!< orxonox network version identifier
[9263]47#define _ORXONOX_VERSION   1
[9262]48
49
[5530]50typedef unsigned char byte;
51
52
[9246]53//!< enum indicating the type of the node
[5649]54typedef enum {
[9248]55  NET_MASTER_SERVER,
[9302]56  NET_PROXY_SERVER_ACTIVE,
57  NET_PROXY_SERVER_PASSIVE,
[9248]58  NET_CLIENT,
59
60  NET_NR_TYPES
61
[5649]62} NodeType;
63
[9246]64//!< enum indicating the type of the network connection (2 protocols supported)
[7954]65typedef enum ConnectionType {
66  NET_UDP = 0,
67  NET_TCP
68};
[6695]69
[9246]70//!< the type of the user id (special number never used elsewhere)
[6695]71typedef enum {
72  NET_UID_UNASSIGNED = -1,
73
74  NET_UID_NUMBER
75} UidType;
76
[5530]77#endif /* _NETWORK_MANAGER */
Note: See TracBrowser for help on using the repository browser.