Changeset 9459 in orxonox.OLD
- Timestamp:
- Jul 25, 2006, 5:07:38 PM (18 years ago)
- Location:
- branches/proxy/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/README.NETWORK
r9450 r9459 8 8 9 9 UserId: 10 ======= 10 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) 11 12 … … 34 35 35 36 uniqueId: 37 ========= 36 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 37 39 38 40 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 39 53 NetworkStream PeerInfo list: (peers) 54 ===================================== 40 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). -
branches/proxy/src/lib/network/network_stream.cc
r9452 r9459 360 360 //check for new connections 361 361 362 NetworkSocket* tempNetworkSocket = serverSocket->getNew Socket();362 NetworkSocket* tempNetworkSocket = serverSocket->getNewClientSocket(); 363 363 364 364 // we got new network node … … 366 366 { 367 367 int clientId; 368 // if there is a list of free client id slots, take these368 // determine the network node id 369 369 if ( freeSocketSlots.size() > 0 ) 370 370 { -
branches/proxy/src/lib/network/network_stream.h
r9453 r9459 55 55 56 56 /* functions for the peerInfo information retreival */ 57 /** @returns true if this userId is activated at this client false if not*/ 57 58 inline bool isUserIdActive( int userID ) { return (peers.find(userID) != peers.end()); } 59 /** @returns true if this userId is a local client */ 60 inline bool isUserLocal( int userID) { return this->isUserIdActive(userID); } 61 /** @returns true if this user is a master server */ 58 62 inline bool isUserMasterServer( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isMasterServer(); } 63 /** @returns true if this user is a proxy server */ 59 64 inline bool isUserProxyServerActive( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isProxyServerActive(); } 65 /** @returns true if this user is a client */ 60 66 inline bool isUserClient( int userID ){ if ( !isUserIdActive(userID) ) return false; return peers[userID].isClient(); } 61 67 -
branches/proxy/src/lib/network/server_socket.h
r7954 r9459 25 25 26 26 virtual bool listen( unsigned int port ) = 0; 27 virtual NetworkSocket* getNewSocket( void ) = 0; 27 virtual NetworkSocket* getNewClientSocket( void ) = 0; 28 // virtual NetworkSocket* getNewClientSocket( void ) = 0; 28 29 virtual void close() = 0; 29 30 virtual void update() = 0; -
branches/proxy/src/lib/network/synchronizeable.cc
r9458 r9459 416 416 void Synchronizeable::registerVar( SynchronizeableVar * var ) 417 417 { 418 //PRINTF(0)("ADDING VAR: %s\n", var->getName().c_str());419 418 syncVarList.push_back( var ); 420 419 } … … 428 427 int Synchronizeable::registerVarId( SynchronizeableVar * var ) 429 428 { 430 //PRINTF(0)("ADDING VAR: %s\n", var->getName().c_str());431 429 syncVarList.push_back( var ); 432 430 var->setWatched( true ); -
branches/proxy/src/lib/network/tcp_server_socket.cc
r9406 r9459 105 105 106 106 107 NetworkSocket* TcpServerSocket::getNew Socket( )107 NetworkSocket* TcpServerSocket::getNewClientSocket( ) 108 108 { 109 109 if ( !listenSocket ) -
branches/proxy/src/lib/network/tcp_server_socket.h
r9406 r9459 25 25 26 26 virtual bool listen( unsigned int port ); 27 virtual NetworkSocket* getNew Socket( void );27 virtual NetworkSocket* getNewClientSocket( void ); 28 28 virtual void close(); 29 29 virtual void update() {}; -
branches/proxy/src/lib/network/udp_server_socket.cc
r8802 r9459 80 80 * @return new socket or NULL if no new socket exists 81 81 */ 82 NetworkSocket * UdpServerSocket::getNew Socket( void )82 NetworkSocket * UdpServerSocket::getNewClientSocket( void ) 83 83 { 84 84 NetworkSocket * result = NULL; -
branches/proxy/src/lib/network/udp_server_socket.h
r9246 r9459 51 51 virtual bool listen( unsigned int port ); 52 52 53 virtual NetworkSocket* getNew Socket( void );53 virtual NetworkSocket* getNewClientSocket( void ); 54 54 55 55 virtual void close(); -
branches/proxy/src/subprojects/network/network_unit_test.cc
r9406 r9459 50 50 { 51 51 server.update(); 52 server1 = server.getNew Socket();52 server1 = server.getNewClientSocket(); 53 53 } 54 54 … … 61 61 { 62 62 server.update(); 63 server2 = server.getNew Socket();63 server2 = server.getNewClientSocket(); 64 64 } 65 65
Note: See TracChangeset
for help on using the changeset viewer.