Changeset 9584 in orxonox.OLD for branches/proxy/src/lib/network/network_stream.cc
- Timestamp:
- Jul 28, 2006, 10:22:09 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_stream.cc
r9583 r9584 121 121 this->pInfo->lastAckedState = 0; 122 122 this->pInfo->lastRecvedState = 0; 123 this->pInfo->bLocal = true; 123 124 124 125 this->bRedirect = false; … … 200 201 this->peers[node].connectionMonitor = new ConnectionMonitor( NET_ID_MASTER_SERVER ); 201 202 this->peers[node].ip = this->peers[node].socket->getRemoteAddress(); 203 this->peers[node].bLocal = true; 202 204 } 203 205 … … 219 221 this->peers[proxyId].connectionMonitor = new ConnectionMonitor( proxyId ); 220 222 this->peers[proxyId].ip = this->peers[proxyId].socket->getRemoteAddress(); 223 this->peers[proxyId].bLocal = true; 221 224 } 222 225 … … 257 260 // fake the unique id 258 261 hs->setUniqueID( NET_UID_HANDSHAKE ); 259 assert( peers[userId].handshake == NULL ); 260 peers[userId].handshake = hs; 262 assert( this->peers[userId].handshake == NULL ); 263 this->peers[userId].handshake = hs; 264 this->peers[userId].bLocal = true; 261 265 262 266 // set the preferred nick name … … 495 499 { 496 500 // create new handshake and init its variables 497 peers[userId].handshake = new Handshake(this->pInfo->nodeType, userId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID()); 498 peers[userId].handshake->setUniqueID(userId); 499 500 peers[userId].connectionMonitor = new ConnectionMonitor( userId ); 501 peers[userId].userId = userId; 501 this->peers[userId].handshake = new Handshake(this->pInfo->nodeType, userId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID()); 502 this->peers[userId].handshake->setUniqueID(userId); 503 504 this->peers[userId].connectionMonitor = new ConnectionMonitor( userId ); 505 this->peers[userId].userId = userId; 506 this->peers[userId].bLocal = true; 502 507 503 508 PRINTF(0)("num sync: %d\n", synchronizeables.size()); … … 508 513 if( pi != NULL) 509 514 { 510 peers[userId].handshake->setProxy1Address( pi->ip);515 this->peers[userId].handshake->setProxy1Address( pi->ip); 511 516 } 512 517 pi = this->networkMonitor->getSecondChoiceProxy(); 513 518 if( pi != NULL) 514 peers[userId].handshake->setProxy2Address( pi->ip);519 this->peers[userId].handshake->setProxy2Address( pi->ip); 515 520 516 521 // check if the connecting client should reconnect to a proxy server 517 522 if( SharedNetworkData::getInstance()->isMasterServer()) 518 peers[userId].handshake->setRedirect(/*this->networkMonitor->isReconnectNextClient()*/false);523 this->peers[userId].handshake->setRedirect(/*this->networkMonitor->isReconnectNextClient()*/false); 519 524 520 525 // the connecting node of course is a client 521 peers[userId].ip =peers[userId].socket->getRemoteAddress();526 this->peers[userId].ip = this->peers[userId].socket->getRemoteAddress(); 522 527 } 523 528
Note: See TracChangeset
for help on using the changeset viewer.