Last change
on this file since 9468 was
9459,
checked in by patrick, 18 years ago
|
deep framework switch to enable differentiation of proxy/client network connection attempts
|
File size:
2.1 KB
|
Rev | Line | |
---|
[9396] | 1 | |
---|
| 2 | |
---|
| 3 | This readme just gives some hints for the general network programming: |
---|
| 4 | |
---|
[9397] | 5 | ARCHITECTURE: |
---|
| 6 | The NetworkStream is in the center of this structure. |
---|
| 7 | |
---|
| 8 | |
---|
[9396] | 9 | UserId: |
---|
[9459] | 10 | ======= |
---|
[9396] | 11 | containing 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) |
---|
| 12 | |
---|
[9449] | 13 | the 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] | 14 | |
---|
[9449] | 15 | There are some reserved id's, don't mess with them: |
---|
| 16 | 0 : Master Server |
---|
| 17 | 1 : First Proxy Server |
---|
| 18 | 2 : Second Proxy Server |
---|
| 19 | 3 : Third Proxy Server |
---|
| 20 | 4 : Fourth Proxy Server |
---|
| 21 | . |
---|
| 22 | . |
---|
| 23 | . |
---|
| 24 | NET_MAX_PROXY The maximal number of proxy servers |
---|
| 25 | NET_MAX... + 1 First Client |
---|
| 26 | NET_MAX... + 2 Second Client |
---|
| 27 | . |
---|
| 28 | . |
---|
| 29 | . |
---|
| 30 | NET_MAX_CONNECTION Last client |
---|
| 31 | |
---|
[9450] | 32 | The 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] | 33 | |
---|
| 34 | |
---|
[9450] | 35 | |
---|
[9400] | 36 | uniqueId: |
---|
[9459] | 37 | ========= |
---|
[9400] | 38 | uniqueId 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 |
---|
| 39 | |
---|
| 40 | |
---|
[9459] | 41 | permissions: |
---|
| 42 | ============ |
---|
| 43 | Each synchronizeable variable has some write permissions. this permission systems allows to manage which network nodes are able to write the variables. |
---|
| 44 | PERMISSION_MASTER_SERVER : only the master server can write this variable |
---|
| 45 | PERMISSION_PROXY_SERVER : only the proxy server can write this variable |
---|
| 46 | PERMISSION_OWNER : only the owner can write this variable |
---|
| 47 | PERMISSION_ALL : all clients can write this variable |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
| 52 | |
---|
[9396] | 53 | NetworkStream PeerInfo list: (peers) |
---|
[9459] | 54 | ===================================== |
---|
[9396] | 55 | The 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.