Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2006, 10:35:26 AM (18 years ago)
Author:
patrick
Message:

starting switch to multiple server states (proxy, master, client,..)

File:
1 edited

Legend:

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

    r9246 r9248  
    5252
    5353
     54/**
     55 * empty constructor
     56 */
    5457NetworkStream::NetworkStream()
    5558    : DataStream()
     
    6265
    6366/**
    64  * connect to a server as a client
     67 * start as a client, connect to a server
    6568 *  @param host: host name (address)
    6669 *  @param port: port number
     
    8386NetworkStream::NetworkStream( int port )
    8487{
    85   this->type = NET_SERVER;
     88  this->type = NET_MASTER_SERVER;
    8689  this->init();
    8790  this->serverSocket = new UdpServerSocket(port);
     
    100103  this->serverSocket = NULL;
    101104  this->networkGameManager = NULL;
    102   myHostId = 0;
    103   currentState = 0;
     105  this->myHostId = 0;
     106  this->currentState = 0;
    104107
    105108  remainingBytesToWriteToDict = Preferences::getInstance()->getInt( "compression", "writedict", 0 );
     
    373376void NetworkStream::debug()
    374377{
    375   if( this->isServer())
     378  if( this->isMasterServer())
    376379    PRINT(0)(" Host ist Server with ID: %i\n", this->myHostId);
    377380  else
     
    524527
    525528      // server fakes uniqueid == 0 for handshake
    526       if ( this->isServer() && sync.getUniqueID() < MAX_CONNECTIONS - 1 )
     529      if ( this->isMasterServer() && sync.getUniqueID() < MAX_CONNECTIONS - 1 )
    527530        n = Converter::intToByteArray( 0, buf + offset, UDP_PACKET_SIZE - offset );
    528531      else
Note: See TracChangeset for help on using the changeset viewer.