- Timestamp:
- Jul 13, 2006, 2:00:20 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/handshake.cc
r9268 r9269 58 58 localState.orxId = _ORXONOX_ID; 59 59 localState.version = _ORXONOX_VERSION; 60 // localState.nodeType = 60 localState.nodeType = NET_CLIENT; 61 61 localState.canDel = 0; 62 62 … … 69 69 remoteState.orxId = 0; 70 70 remoteState.version = 0; 71 remoteState.nodeType = NET_CLIENT; 71 72 remoteState.canDel = 0; 72 73 … … 85 86 { 86 87 // orxonox id handler 87 if ( *it == orxId_handler )88 if ( *it == this->orxId_handler ) 88 89 { 89 90 if ( remoteState.orxId != _ORXONOX_ID ) … … 94 95 continue; 95 96 } 96 97 97 } 98 98 99 99 // orxonox version handler 100 if ( *it == version_handler )100 if ( *it == this->version_handler ) 101 101 { 102 102 if ( remoteState.version != _ORXONOX_VERSION ) … … 107 107 continue; 108 108 } 109 } 109 110 111 // node type handler: for each node type there is a specific action to be taken 112 if ( *it == this->nodeTypeHandler) 113 { 114 if ( remoteState.nodeType == NET_MASTER_SERVER ) 115 { 116 continue; 117 } 118 else if( remoteState.nodeType == NET_PROXY_SERVER) 119 { 120 continue; 121 } 122 else if( remoteState.nodeType == NET_CLIENT) 123 { 124 continue; 125 } 110 126 } 127 111 128 112 129 // cancel -
branches/proxy/src/lib/network/handshake.h
r9268 r9269 43 43 /** @returns true if no error has occured until now */ 44 44 inline bool ok(){ return localState.error == 0 && remoteState.error == 0; } 45 /** stops the handshake and reject the other side with @param reason: string describing the reason */ 45 46 inline void doReject( std::string reason ){ localState.error = 1; localState.errorString = "the server rejected your connection ["+ reason +"]"; } 46 47 /** @returns true if the handshake is finished and the instances can be deleted */ … … 58 59 /** @returns the unique id of the message manager */ 59 60 inline int getMessageManagerId(){ return remoteState.messageManagerId; } 60 /** stops the handshake and reject the other side with @param reason: string describing the reason */ 61 /** @returns the node type of the remote host */ 62 inline int getRemoteNodeType() { return this->remoteState.nodeType; } 61 63 62 64 /** sets @param nick the prefereded nick name */ -
branches/proxy/src/lib/network/network_monitor.h
r9266 r9269 15 15 class PeerInfo; 16 16 17 class OrxGui::GLGuiBox;17 namespace OrxGui { class GLGuiBox; }; 18 18 19 19 class NetworkMonitor : public Synchronizeable -
branches/proxy/src/lib/network/network_stream.cc
r9268 r9269 429 429 if ( it->second.handshake ) 430 430 { 431 // handshake finished 431 432 if ( it->second.handshake->completed() ) 432 433 { 434 //handshake is correct 433 435 if ( it->second.handshake->ok() ) 434 436 { 435 437 if ( !it->second.handshake->allowDel() ) 436 438 { 437 //if ( type != NET_MASTER_SERVER )438 439 if ( type == NET_CLIENT ) 439 440 { … … 453 454 else 454 455 { 456 // handsheke finished registring new player 455 457 if ( it->second.handshake->canDel() ) 456 458 {
Note: See TracChangeset
for help on using the changeset viewer.