Changeset 5798 in orxonox.OLD for branches/network/src/lib
- Timestamp:
- Nov 27, 2005, 5:52:32 PM (19 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/connection_monitor.cc
r5749 r5798 128 128 void ConnectionMonitor::displayStatistic() 129 129 { 130 PRINT(0)("============================================\n");131 PRINT(0)("Connection Monitor Network Statistics:\n");132 PRINT(0)("Total received packets:",totalReceivedPackets);133 PRINT(0)("Average datarate :\n",averageDatarate);134 PRINT(0)("Total lost packets:",totalLostPackets);135 PRINT(0)("Packetloss [%] :\n",totalPacketloss);136 137 PRINT(0)("Current datarate :\n",currentDatarate);138 PRINT(0)("Delays of the last few packets :\n");139 for(int i=1 ;i <= packetToAverage-1;i++)140 PRINT(0)("%i ",lastFewDelays[i]);141 142 PRINT(0)("============================================\n");130 // PRINT(0)("============================================\n"); 131 // PRINT(0)("Connection Monitor Network Statistics:\n"); 132 // PRINT(0)("Total received packets:",totalReceivedPackets); 133 // PRINT(0)("Average datarate :\n",averageDatarate); 134 // PRINT(0)("Total lost packets:",totalLostPackets); 135 // PRINT(0)("Packetloss [%] :\n",totalPacketloss); 136 // 137 // PRINT(0)("Current datarate :\n",currentDatarate); 138 // PRINT(0)("Delays of the last few packets :\n"); 139 // for(int i=1 ;i <= packetToAverage-1;i++) 140 // PRINT(0)("%i ",lastFewDelays[i]); 141 // 142 // PRINT(0)("============================================\n"); 143 143 144 144 } -
branches/network/src/lib/network/network_manager.cc
r5649 r5798 167 167 while( stream) 168 168 { 169 printf("NetworkManager::synchronize "); 170 if(stream->isServer()) printf("Server\n"); else printf("Client\n"); 169 171 stream->processData(); 170 172 stream = (NetworkStream*)(iterator->nextElement()); -
branches/network/src/lib/network/network_socket.cc
r5752 r5798 218 218 memcpy(outgoingBuffer + outgoingBufferLength, data, nbytes); 219 219 outgoingBufferLength += nbytes; 220 220 221 221 SDL_mutexV(outgoingBufferMutex); 222 222 -
branches/network/src/lib/network/network_stream.cc
r5747 r5798 121 121 122 122 /* first of all read data from networkSocket*/ 123 while(ret == 0)124 123 ret = this->networkSocket->readBlock((byte*)upBuffer, PACKAGE_SIZE + sizeof(Header)); 125 124 /* error checking: data read? */ -
branches/network/src/lib/network/network_stream.h
r5741 r5798 26 26 void init(); 27 27 28 inline bool isServer() { return (this->type == NET_SERVER)? true:false; } 28 29 virtual void processData(); 29 30 … … 35 36 Synchronizeable* synchronizeables; 36 37 NetworkSocket* networkSocket; 38 int type; 37 39 }; 38 40 #endif /* _NETWORK_STREAM */
Note: See TracChangeset
for help on using the changeset viewer.