Changeset 9255 in orxonox.OLD for branches/proxy
- Timestamp:
- Jul 12, 2006, 2:05:42 PM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_stream.cc
r9254 r9255 92 92 this->init(); 93 93 this->serverSocket = new UdpServerSocket(port); 94 // this->bActive = true;95 94 } 96 95 … … 103 102 /* set the class id for the base object */ 104 103 this->setClassID(CL_NETWORK_STREAM, "NetworkStream"); 105 // this->bActive = false;106 104 this->serverSocket = NULL; 107 105 this->networkGameManager = NULL; … … 223 221 int tick = SDL_GetTicks(); 224 222 225 currentState++; 223 this->currentState++; 224 // there was a wrap around 225 if( this->currentState < 0) 226 { 227 PRINTF(1)("A wrap around in the state variable as occured. The server was running so long? Pls restart server or write a mail to the supporters!\n"); 228 } 226 229 227 230 if ( this->type == NET_MASTER_SERVER ) 228 231 { 232 // execute everytthing the master server shoudl do 229 233 if ( serverSocket ) 230 234 serverSocket->update(); 231 235 232 236 this->updateConnectionList(); 237 } 238 else if( this->type == NET_PROXY_SERVER) 239 { 240 // execute everything the proxy server should do 233 241 } 234 242 else … … 643 651 assert( Converter::byteArrayToInt( buf + 2*INTSIZE, &fromState ) == INTSIZE ); 644 652 assert( Converter::byteArrayToInt( buf + 3*INTSIZE, &ackedState ) == INTSIZE ); 645 //NETPRINTF(n)("ackedstate: %d\n", ackedState);646 653 offset = 4*INTSIZE; 647 654 648 655 peer->second.connectionMonitor->processUnzippedIncomingPacket( tick, buf, packetLength, state, ackedState ); 649 656 650 //NETPRINTF(n)("got packet: %d, %d\n", length, packetLength); 651 652 //if this is an old state drop it 657 658 //if this is an old state drop it 653 659 if ( state <= peer->second.lastRecvedState ) 654 660 continue; -
branches/proxy/src/lib/network/network_stream.h
r9254 r9255 87 87 int type; //!< the type of this host (NET_CLIENT, NET_MASTER_SERVER,...) 88 88 int myHostId; //!< the host id of the localhost 89 /* bool bActive; */ //!< true if this host is active90 89 91 90 std::list<int> freeSocketSlots; //!< list of free sockets (to ensure not to resycle sockets)
Note: See TracChangeset
for help on using the changeset viewer.