Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9264 was 9263, checked in by patrick, 19 years ago

added the new network monitor class and some minor changes

File size: 1.6 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 */
24
[5624]25#ifndef _NETDEFS
26#define _NETDEFS
[5530]27
[5588]28#ifdef HAVE_SDL_NET_H
[5605]29  #include <SDL_net.h>
[5588]30#else
[5605]31  #include <SDL/SDL_net.h>
[5588]32#endif
33
[5605]34
[9262]35/* maximal connectinons for the server*/
[6695]36#define MAX_CONNECTIONS 1000
37
[9262]38/* network polling frequency */
[8802]39#define NETWORK_FREQUENCY 66
[6695]40
[7954]41
[9262]42/* handshake settings */
[9263]43#define _ORXONOX_ID        0xF91337A0
44#define _ORXONOX_VERSION   1
[9262]45
46
[5530]47typedef unsigned char byte;
48
49
[9246]50//!< enum indicating the type of the node
[5649]51typedef enum {
[9248]52  NET_MASTER_SERVER,
53  NET_PROXY_SERVER,
54  NET_CLIENT,
55
56  NET_NR_TYPES
57
[5649]58} NodeType;
59
[9246]60//!< enum indicating the type of the network connection (2 protocols supported)
[7954]61typedef enum ConnectionType {
62  NET_UDP = 0,
63  NET_TCP
64};
[6695]65
[9246]66//!< the type of the user id (special number never used elsewhere)
[6695]67typedef enum {
68  NET_UID_UNASSIGNED = -1,
69
70  NET_UID_NUMBER
71} UidType;
72
[5530]73#endif /* _NETWORK_MANAGER */
Note: See TracBrowser for help on using the repository browser.