Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 28, 2006, 10:22:09 PM (18 years ago)
Author:
patrick
Message:

proxy control center now registers joining clients to the network monitor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/network_stream.cc

    r9583 r9584  
    121121  this->pInfo->lastAckedState = 0;
    122122  this->pInfo->lastRecvedState = 0;
     123  this->pInfo->bLocal = true;
    123124
    124125  this->bRedirect = false;
     
    200201  this->peers[node].connectionMonitor = new ConnectionMonitor( NET_ID_MASTER_SERVER );
    201202  this->peers[node].ip = this->peers[node].socket->getRemoteAddress();
     203  this->peers[node].bLocal = true;
    202204}
    203205
     
    219221  this->peers[proxyId].connectionMonitor = new ConnectionMonitor( proxyId );
    220222  this->peers[proxyId].ip = this->peers[proxyId].socket->getRemoteAddress();
     223  this->peers[proxyId].bLocal = true;
    221224}
    222225
     
    257260  // fake the unique id
    258261  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;
    261265
    262266  // set the preferred nick name
     
    495499{
    496500  // 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;
    502507
    503508  PRINTF(0)("num sync: %d\n", synchronizeables.size());
     
    508513  if( pi != NULL)
    509514  {
    510     peers[userId].handshake->setProxy1Address( pi->ip);
     515    this->peers[userId].handshake->setProxy1Address( pi->ip);
    511516  }
    512517  pi = this->networkMonitor->getSecondChoiceProxy();
    513518  if( pi != NULL)
    514     peers[userId].handshake->setProxy2Address( pi->ip);
     519    this->peers[userId].handshake->setProxy2Address( pi->ip);
    515520
    516521  // check if the connecting client should reconnect to a proxy server
    517522  if( SharedNetworkData::getInstance()->isMasterServer())
    518     peers[userId].handshake->setRedirect(/*this->networkMonitor->isReconnectNextClient()*/false);
     523    this->peers[userId].handshake->setRedirect(/*this->networkMonitor->isReconnectNextClient()*/false);
    519524
    520525  // 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();
    522527}
    523528
Note: See TracChangeset for help on using the changeset viewer.