Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/proxy/src/lib/network/README.NETWORK @ 9458

Last change on this file since 9458 was 9450, checked in by patrick, 18 years ago

using the new id scheme

File size: 1.5 KB
RevLine 
[9396]1
2
3This readme just gives some hints for the general network programming:
4
[9397]5ARCHITECTURE:
6The NetworkStream is in the center of this structure.
7
8
[9396]9UserId:
10containing the id of a user (==client). This id must be unique within a orxonox network its used especialy in the NetworkStream for node identification and also in the Synchronizeable base class for permissions checking (PERMISSION_OWNER)
11
[9449]12the connections belonging tu toe userId's are stored in the NetworkStream::peers std::map. As a keyvalue the userId's are used. Therefore the usage of this peers map is very delicate. Don't ever try to add anything you are not sure about the id stuff.
[9396]13
[9449]14There are some reserved id's, don't mess with them:
150 :                  Master Server
161 :                  First Proxy Server
172 :                  Second Proxy Server
183 :                  Third Proxy Server
194 :                  Fourth Proxy Server
20.
21.
22.
23NET_MAX_PROXY        The maximal number of proxy servers
24NET_MAX... + 1       First Client
25NET_MAX... + 2       Second Client
26.
27.
28.
29NET_MAX_CONNECTION   Last client
30
[9450]31The proxy server ids are assigned as stated in the data/trunk/config/network_settings.conf, the first proxy server in the list gets the id NET_ID_PROXY_01 and so on.
[9449]32
33
[9450]34
[9400]35uniqueId:
36uniqueId is an id (unique :D) for each synchronizeable to be identified in a network. the number space for uniqueIds goes from 0 to maxplayers - 1
37
38
[9396]39NetworkStream PeerInfo list: (peers)
40The network node with the offset 0 is always the server to which the client must connect to (in case there are connections to other hosts at the same time).
Note: See TracBrowser for help on using the repository browser.