Changeset 5805 in orxonox.OLD for branches/network/src/subprojects
- Timestamp:
- Nov 28, 2005, 6:36:16 PM (19 years ago)
- Location:
- branches/network/src/subprojects/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/subprojects/network/network_unit_test.cc
r5804 r5805 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 146 146 147 /* synchronize the data 1 time (increment for longer tests) */ 147 for( int i = 0; i < 2; i++) {148 for( int i = 0; i < 3; i++) { 148 149 nm->synchronize(); 150 /* simulate the network delay */ 151 SDL_Delay(50); 149 152 } 150 153 -
branches/network/src/subprojects/network/simple_sync.cc
r5804 r5805 66 66 if(this->inLength < length) 67 67 PRINTF(0)("ERROR: local buffer is smaller than the data to receive.\n"); 68 68 69 /* copy the data localy */ 69 70 for( int i = 0; i < length; i++) … … 82 83 { 83 84 PRINTF(0)("SimpleSync: sent %i bytes of data\n", this->outLength); 85 84 86 /* write the test message */ 85 data = this->outData; 87 for( int i = 0; i < this->outLength; i++) 88 { 89 data[i] = this->outData[i]; 90 } 91 86 92 /* debug msg */ 87 93 this->readDebug(); … … 93 99 void SimpleSync::writeDebug() 94 100 { 95 PRINTF(0)("Write in :|");101 PRINTF(0)("Write in bytes: \t(0 <-) |"); 96 102 for(int i = 0; i < this->recLength; i++) 97 103 { … … 104 110 void SimpleSync::readDebug() 105 111 { 106 PRINTF(0)("Read out bytes: |");112 PRINTF(0)("Read out bytes: \t(0 ->) |"); 107 113 for(int i = 0; i < this->outLength; i++) 108 114 {
Note: See TracChangeset
for help on using the changeset viewer.