Changeset 5650 in orxonox.OLD for branches/network/src/lib/network/network_stream.cc
- Timestamp:
- Nov 20, 2005, 3:39:38 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_stream.cc
r5649 r5650 85 85 byte* test = (byte *)data[0]; // obsolete, for debugging only 86 86 int ret = 0; 87 this->synchronizeable->writeByteStream(NULL); 88 ret = this->networkSocket->writeBytes(NULL,1); 89 test = this->synchronizeable->readByteStream(); 90 ret = this->networkSocket->readBytes(test,1); 87 88 byte downData[10]; 89 byte upData[10]; 90 91 /* DOWNSTREAM */ 92 /* first of all read the synchronizeable's data: */ 93 ret = this->synchronizeable->readBytes(downData); 94 /* pass the data to the network socket */ 95 ret = this->networkSocket->writeBytes(downData, ret); 96 /* check if there was an error */ 97 if( ret == -1) { PRINTF(0)("Error in writing data to the NetworkSocket\n");} 98 99 100 /* UPSTREAM */ 101 /* first read 10bytes of data (debug) */ 102 ret = this->networkSocket->readBytes(upData, 0); 103 /* error checking: data read? */ 104 if( ret != 10) { PRINTF(0)("Error while reading data from the NetworkSocket\n");} 105 /* now pass the data to the sync object */ 106 this->synchronizeable->writeBytes(upData, 0); 107 108 109 91 110 } 92 111
Note: See TracChangeset
for help on using the changeset viewer.