Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5719 in orxonox.OLD for branches


Ignore:
Timestamp:
Nov 23, 2005, 1:10:17 AM (19 years ago)
Author:
bknecht
Message:

updated function names in DataStream and made some minor changes

Location:
branches/network/src/lib/network
Files:
2 edited

Legend:

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

    r5649 r5719  
    5151{
    5252    this->setClassID(CL_DATA_STREAM, "DataStream");
    53     downStream = &outStream;
    54     upStream = &inStream;
     53    this->downStream = &outStream;
     54    this->upStream = &inStream;
    5555}
    5656
     
    6161{
    6262    this->setClassID(CL_DATA_STREAM, "DataStream");
    63     networkSocket = &socket;
     63    this->networkSocket = &socket;
    6464}
    6565
     
    7070{
    7171    this->setClassID(CL_DATA_STREAM, "DataStream");
    72     downStream = &outStream;
     72    this->downStream = &outStream;
    7373}
    7474
     
    7979{
    8080     this->setClassID(CL_DATA_STREAM, "DataStream");
    81      upStream = &inStream;
    82      networkSocket = &socket;
     81     this->upStream = &inStream;
     82     this->networkSocket = &socket;
    8383}
    8484
     
    166166 * This function writes the binary data to the local data. You will have to copy each byte and not only dublicate
    167167 * it.
     168 *
     169 * @param data: the binary array
     170 * @param length: the length of the array
    168171 */
    169 void DataStream::writeBytes(byte& data)
     172void passDown(byte* data, int length)
    170173{
    171 
     174     
    172175}
    173176
     
    177180 * The reading function will have to copy the whole data and musn't just reference it!
    178181 * This function is only called from other connected DataStreams to read the data.
     182 *
     183 * @param data: the binary array
     184 * @return: the length of the data
    179185 */
    180 byte& DataStream::readBytes()
     186int passUp(byte* data)
    181187{
    182 
     188   
    183189}
  • branches/network/src/lib/network/data_stream.h

    r5649 r5719  
    5050
    5151      protected:
    52       void writeBytes(byte& data);
     52      void passDown(byte* data, int length);
    5353
    54       byte& readBytes();
     54      int passUp(byte* data);
    5555     
    5656      byte inBuffer [];
Note: See TracChangeset for help on using the changeset viewer.