Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

the clients now almost synchronizes with the proxy :D

File size: 2.5 KB
RevLine 
[9396]1
2
[9480]3
4WORKING_STACK:
5==============
6 - it works to connecto to a master server which is connected to a proxy itself
7
8
[9486]9
[9480]10UNSOLVED:
11=========
12 - what if the proxy server gets a new client and wants to add it to the game? There are some problems waiting in the network game manager
13 - actualy the whole message sending system won't work in this network topic. proxys have to relay messages to clients
[9486]14 - the clients cant get its ip in the handleHandshakes without throuwing sigseg
[9480]15
16
17
[9396]18This readme just gives some hints for the general network programming:
19
[9397]20ARCHITECTURE:
21The NetworkStream is in the center of this structure.
22
23
[9396]24UserId:
[9459]25=======
[9396]26containing 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)
27
[9449]28the 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]29
[9449]30There are some reserved id's, don't mess with them:
310 :                  Master Server
321 :                  First Proxy Server
332 :                  Second Proxy Server
343 :                  Third Proxy Server
354 :                  Fourth Proxy Server
36.
37.
38.
39NET_MAX_PROXY        The maximal number of proxy servers
40NET_MAX... + 1       First Client
41NET_MAX... + 2       Second Client
42.
43.
44.
45NET_MAX_CONNECTION   Last client
46
[9450]47The 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]48
49
[9450]50
[9400]51uniqueId:
[9459]52=========
[9400]53uniqueId 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
54
55
[9459]56permissions:
57============
58Each synchronizeable variable has some write permissions. this permission systems allows to manage which network nodes are able to write the variables.
59PERMISSION_MASTER_SERVER       : only the master server can write this variable
60PERMISSION_PROXY_SERVER        : only the proxy server can write this variable
61PERMISSION_OWNER               : only the owner can write this variable
62PERMISSION_ALL                 : all clients can write this variable
63
64
65
66
67
[9396]68NetworkStream PeerInfo list: (peers)
[9459]69=====================================
[9474]70The 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).
71
72
73
Note: See TracBrowser for help on using the repository browser.