Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5730 in orxonox.OLD for branches/network/src


Ignore:
Timestamp:
Nov 23, 2005, 2:55:18 PM (19 years ago)
Author:
bottac
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_stream.cc

    r5728 r5730  
    9292  int ret = 0;
    9393 
    94   byte downData[10];
    95   byte upData[10];
     94 
    9695 
    9796  /* DOWNSTREAM */
    9897  /* first of all read the synchronizeable's data: */
    99   ret = this->synchronizeables->readBytes(downData);
     98
     99  ret = this->synchronizeables->readBytes((byte*)downBuffer);
     100
    100101  /* pass the data to the network socket */
    101   ret = this->networkSocket->writeBytes(downData, ret);
     102  ret = this->networkSocket->writeBytes((byte*)downBuffer, PACKAGE_SIZE);
    102103  /* check if there was an error */
    103104  if( ret == -1) { PRINTF(0)("Error in writing data to the NetworkSocket\n");}
     
    107108  /* first read 10bytes of data (debug) */
    108109
    109  while(ret == 0) { this->networkSocket->readBytes(upData,PACKAGE_SIZE);}
     110 while(ret == 0) { ret = this->networkSocket->readBytes((byte*)upBuffer,PACKAGE_SIZE);}
    110111
    111112
     
    113114  if( ret != 10) { PRINTF(0)("Error while reading data from the NetworkSocket\n");}
    114115  /* now pass the data to the sync object */
    115   this->synchronizeables->writeBytes(upData, 0);
     116
     117  this->synchronizeables->writeBytes((byte*)upBuffer, PACKAGE_SIZE);
     118
    116119 
    117120 
Note: See TracChangeset for help on using the changeset viewer.