Changeset 9248 in orxonox.OLD for branches/proxy/src/lib/network/network_stream.cc
- Timestamp:
- Jul 12, 2006, 10:35:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_stream.cc
r9246 r9248 52 52 53 53 54 /** 55 * empty constructor 56 */ 54 57 NetworkStream::NetworkStream() 55 58 : DataStream() … … 62 65 63 66 /** 64 * connect to a server as a client67 * start as a client, connect to a server 65 68 * @param host: host name (address) 66 69 * @param port: port number … … 83 86 NetworkStream::NetworkStream( int port ) 84 87 { 85 this->type = NET_ SERVER;88 this->type = NET_MASTER_SERVER; 86 89 this->init(); 87 90 this->serverSocket = new UdpServerSocket(port); … … 100 103 this->serverSocket = NULL; 101 104 this->networkGameManager = NULL; 102 myHostId = 0;103 currentState = 0;105 this->myHostId = 0; 106 this->currentState = 0; 104 107 105 108 remainingBytesToWriteToDict = Preferences::getInstance()->getInt( "compression", "writedict", 0 ); … … 373 376 void NetworkStream::debug() 374 377 { 375 if( this->is Server())378 if( this->isMasterServer()) 376 379 PRINT(0)(" Host ist Server with ID: %i\n", this->myHostId); 377 380 else … … 524 527 525 528 // server fakes uniqueid == 0 for handshake 526 if ( this->is Server() && sync.getUniqueID() < MAX_CONNECTIONS - 1 )529 if ( this->isMasterServer() && sync.getUniqueID() < MAX_CONNECTIONS - 1 ) 527 530 n = Converter::intToByteArray( 0, buf + offset, UDP_PACKET_SIZE - offset ); 528 531 else
Note: See TracChangeset
for help on using the changeset viewer.