[9396] | 1 | |
---|
| 2 | |
---|
[9480] | 3 | |
---|
| 4 | WORKING_STACK: |
---|
| 5 | ============== |
---|
| 6 | - it works to connecto to a master server which is connected to a proxy itself |
---|
| 7 | - it doesn't work to connecto to a proxy which is connected to the master : |
---|
| 8 | segfault during the handshake handling |
---|
| 9 | => investigate the handshake handling (especialy the getRemoteAddress ) |
---|
| 10 | => probably its a problem with the userId's |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | UNSOLVED: |
---|
| 14 | ========= |
---|
| 15 | - 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 |
---|
| 16 | - actualy the whole message sending system won't work in this network topic. proxys have to relay messages to clients |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
[9396] | 21 | This readme just gives some hints for the general network programming: |
---|
| 22 | |
---|
[9397] | 23 | ARCHITECTURE: |
---|
| 24 | The NetworkStream is in the center of this structure. |
---|
| 25 | |
---|
| 26 | |
---|
[9396] | 27 | UserId: |
---|
[9459] | 28 | ======= |
---|
[9396] | 29 | 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) |
---|
| 30 | |
---|
[9449] | 31 | 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] | 32 | |
---|
[9449] | 33 | There are some reserved id's, don't mess with them: |
---|
| 34 | 0 : Master Server |
---|
| 35 | 1 : First Proxy Server |
---|
| 36 | 2 : Second Proxy Server |
---|
| 37 | 3 : Third Proxy Server |
---|
| 38 | 4 : Fourth Proxy Server |
---|
| 39 | . |
---|
| 40 | . |
---|
| 41 | . |
---|
| 42 | NET_MAX_PROXY The maximal number of proxy servers |
---|
| 43 | NET_MAX... + 1 First Client |
---|
| 44 | NET_MAX... + 2 Second Client |
---|
| 45 | . |
---|
| 46 | . |
---|
| 47 | . |
---|
| 48 | NET_MAX_CONNECTION Last client |
---|
| 49 | |
---|
[9450] | 50 | 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] | 51 | |
---|
| 52 | |
---|
[9450] | 53 | |
---|
[9400] | 54 | uniqueId: |
---|
[9459] | 55 | ========= |
---|
[9400] | 56 | 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 |
---|
| 57 | |
---|
| 58 | |
---|
[9459] | 59 | permissions: |
---|
| 60 | ============ |
---|
| 61 | Each synchronizeable variable has some write permissions. this permission systems allows to manage which network nodes are able to write the variables. |
---|
| 62 | PERMISSION_MASTER_SERVER : only the master server can write this variable |
---|
| 63 | PERMISSION_PROXY_SERVER : only the proxy server can write this variable |
---|
| 64 | PERMISSION_OWNER : only the owner can write this variable |
---|
| 65 | PERMISSION_ALL : all clients can write this variable |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | |
---|
[9396] | 71 | NetworkStream PeerInfo list: (peers) |
---|
[9459] | 72 | ===================================== |
---|
[9474] | 73 | 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). |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | |
---|