Changeset 5806 in orxonox.OLD for branches/network/src/subprojects
- Timestamp:
- Nov 28, 2005, 6:49:58 PM (19 years ago)
- Location:
- branches/network/src/subprojects/network
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/subprojects/network/network_unit_test.cc
r5805 r5806 143 143 if(error == -1) printf("\n\nerror on address resolution, program inconsistancy\n\n"); 144 144 nm->establishConnection(ip, *clientSync); 145 SDL_Delay(1000); 145 /* adding some break for connection setup */ 146 SDL_Delay(20); 146 147 147 148 /* synchronize the data 1 time (increment for longer tests) */ -
branches/network/src/subprojects/network/simple_sync.cc
r5805 r5806 60 60 * write data to Synchronizeable 61 61 */ 62 void SimpleSync::writeBytes( byte* data, int length)62 void SimpleSync::writeBytes(const byte* data, int length) 63 63 { 64 64 PRINTF(0)("SimpleSync: got %i bytes of data\n", length); … … 80 80 * read data from Synchronizeable 81 81 */ 82 int SimpleSync::readBytes(byte* data) 82 int SimpleSync::readBytes(byte* data) const 83 83 { 84 84 PRINTF(0)("SimpleSync: sent %i bytes of data\n", this->outLength); 85 85 86 /* debug msg */ 87 this->readDebug(); 88 86 89 /* write the test message */ 87 90 for( int i = 0; i < this->outLength; i++) 88 {89 91 data[i] = this->outData[i]; 90 }91 92 92 /* debug msg */93 this->readDebug();94 93 /* return the length of the test */ 95 94 return this->outLength; … … 97 96 98 97 99 void SimpleSync::writeDebug() 98 void SimpleSync::writeDebug() const 100 99 { 101 100 PRINTF(0)("Write in bytes: \t(0 <-) |"); … … 108 107 109 108 110 void SimpleSync::readDebug() 109 void SimpleSync::readDebug() const 111 110 { 112 111 PRINTF(0)("Read out bytes: \t(0 ->) |"); -
branches/network/src/subprojects/network/simple_sync.h
r5804 r5806 16 16 ~SimpleSync(); 17 17 18 virtual void writeBytes( byte* data, int length);19 virtual int readBytes(byte* data) ;18 virtual void writeBytes(const byte* data, int length); 19 virtual int readBytes(byte* data) const; 20 20 21 21 22 22 private: 23 virtual void writeDebug() ;24 virtual void readDebug() ;23 virtual void writeDebug() const; 24 virtual void readDebug() const; 25 25 26 26
Note: See TracChangeset
for help on using the changeset viewer.