Changeset 9350 in orxonox.OLD
- Timestamp:
- Jul 20, 2006, 12:06:49 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/handshake.cc
r9349 r9350 48 48 registerVar( new SynchronizeableString( &localState.preferedNickName, &remoteState.preferedNickName, "preferedNickName", PERMISSION_ALL ) ); 49 49 // now synchronize only two of the available proxy server addresses 50 registerVar( new SynchronizeableIP( &localState.proxy1, &remoteState.proxy1, "proxy server 1", PERMISSION_ALL ) );51 registerVar( new SynchronizeableIP( &localState.proxy2, &remoteState.proxy2, "proxy server 2", PERMISSION_ALL ) );50 proxy1Handler = registerVarId( new SynchronizeableIP( &localState.proxy1, &remoteState.proxy1, "proxy server 1", PERMISSION_ALL ) ); 51 proxy2Handler = registerVarId( new SynchronizeableIP( &localState.proxy2, &remoteState.proxy2, "proxy server 2", PERMISSION_ALL ) ); 52 52 53 53 // init the local state … … 81 81 remoteState.proxy1 = IP(0, 0); 82 82 remoteState.proxy2 = IP(0, 0); 83 84 85 this->proxyAddressesSynched = 0; 86 83 87 84 88 // activate the synchronization process … … 143 147 } 144 148 149 // the first proxy server synched 150 if( *it == this->proxy1Handler) 151 { 152 this->proxyAddressesSynched++; 153 } 154 155 // the last proxy server synched 156 if( *it == this->proxy2Handler) 157 { 158 this->proxyAddressesSynched++; 159 } 160 145 161 } 146 162 147 163 // handshake completed 148 164 if ( remoteState.orxId == _ORXONOX_ID && 149 remoteState.version == _ORXONOX_VERSION ) 165 remoteState.version == _ORXONOX_VERSION && 166 this->proxyAddressesSynched == 2) 150 167 { 151 168 localState.completed = 1; -
branches/proxy/src/lib/network/handshake.h
r9347 r9350 109 109 int hostId_handler; //!< host id handler 110 110 int nodeTypeHandler; //!< node type handler 111 int proxy1Handler; //!< handler for the proxy 112 int proxy2Handler; //!< handler for the proxy 111 113 112 114 int completed_handler; //!< handshake completion handler … … 116 118 int nodeType; //!, the type of the network node 117 119 120 int proxyAddressesSynched; //!< number of addresses synched 121 118 122 }; 119 123
Note: See TracChangeset
for help on using the changeset viewer.