- Timestamp:
- Jul 18, 2006, 12:57:07 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_stream.cc
r9308 r9309 322 322 peers[clientId].handshake = new Handshake(this->pInfo->nodeType, clientId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID() ); 323 323 peers[clientId].handshake->setUniqueID(clientId); 324 peers[clientId].ip = tempNetworkSocket->getRemoteAddress();325 326 // get the proxy server informations and write them to the handshake, if any (proxy)327 PeerInfo* pi = this->networkMonitor->getFirstChoiceProxy();328 if( pi != NULL)329 peers[clientId].handshake->setProxy1Address( pi->ip);330 pi = this->networkMonitor->getSecondChoiceProxy();331 if( pi != NULL)332 peers[clientId].handshake->setProxy2Address( pi->ip);333 334 // check if the connecting client should reconnect to a proxy server335 peers[clientId].handshake->setRedirect(this->networkMonitor->reconnectNextClient());336 324 337 325 peers[clientId].connectionMonitor = new ConnectionMonitor( clientId ); 338 326 peers[clientId].userId = clientId; 339 peers[clientId].nodeType = NET_CLIENT;340 327 } 341 328 else … … 351 338 peers[clientId].handshake = new Handshake(this->pInfo->nodeType, clientId, this->networkGameManager->getUniqueID(), MessageManager::getInstance()->getUniqueID()); 352 339 peers[clientId].handshake->setUniqueID(clientId); 353 // get the proxy server informations and write them to the handshake, if any (proxy)354 PeerInfo* pi = this->networkMonitor->getFirstChoiceProxy();355 if( pi != NULL)356 peers[clientId].handshake->setProxy1Address( pi->ip);357 pi = this->networkMonitor->getSecondChoiceProxy();358 if( pi != NULL)359 peers[clientId].handshake->setProxy2Address( pi->ip);360 361 // check if the connecting client should reconnect to a proxy server362 peers[clientId].handshake->setRedirect(this->networkMonitor->reconnectNextClient());363 340 364 341 peers[clientId].connectionMonitor = new ConnectionMonitor( clientId ); 365 342 peers[clientId].userId = clientId; 366 peers[clientId].nodeType = NET_CLIENT;367 343 368 344 PRINTF(0)("num sync: %d\n", synchronizeables.size()); 369 345 } 346 347 348 // get the proxy server informations and write them to the handshake, if any (proxy) 349 PeerInfo* pi = this->networkMonitor->getFirstChoiceProxy(); 350 if( pi != NULL) 351 peers[clientId].handshake->setProxy1Address( pi->ip); 352 353 pi = this->networkMonitor->getSecondChoiceProxy(); 354 if( pi != NULL) 355 peers[clientId].handshake->setProxy2Address( pi->ip); 356 357 // check if the connecting client should reconnect to a proxy server 358 peers[clientId].handshake->setRedirect(this->networkMonitor->reconnectNextClient()); 359 360 361 peers[clientId].nodeType = NET_CLIENT; 362 peers[clientId].ip = peers[clientId].socket->getRemoteAddress(); 363 370 364 371 365 // check if there are too many clients connected (DEPRECATED: new: the masterserver sends a list of proxy servers)
Note: See TracChangeset
for help on using the changeset viewer.