Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5728 in orxonox.OLD for branches


Ignore:
Timestamp:
Nov 23, 2005, 2:52:17 PM (19 years ago)
Author:
bknecht
Message:

"synchronized" DataStream with NetworkStream

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

Legend:

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

    r5722 r5728  
    3333}
    3434
    35 
    3635/**
    3736 * This constructor creates a new DataStream and connects it to both streams (upStream, downStream)
     
    5251}
    5352
    54 /**
    55  * This funtion connects this stream to a Synchronizable object. This stream is the top of the stream-chain.
    56  */
    57 void DataStream::connectSynchronizeable(Synchronizeable& sync)
    58 {
    59      
    60 }
    61    
    62 /**
    63  * And this function disconnects the Synch-object and sets it to NULL   
    64  */
    65 void DataStream::disconnectSynchronizeable()
    66 {
    67      
    68 }
    69 
    70 /**
    71  * This function connects the stream to a NetworkSocket. This stream is the bottom of the stream-chain
    72  */   
    73 void DataStream::connectNetworkSocket(NetworkSocket& socket)
    74 {
    75      
    76 }
    77    
    78 /**
    79  * And this function disconnects the Socket and sets it to NULL
    80  */   
    81 void DataStream::disconnectNetworkSocket()
    82 {
    83      
    84 }
    8553
    8654/**
  • branches/network/src/lib/network/data_stream.h

    r5722 r5728  
    1313#include "netdefs.h"
    1414
    15 class Synchronizeable;
    16 class NetworkSocket;
    17 
    1815class DataStream : public BaseObject
    1916{
    2017      public:
    2118      DataStream();
    22       DataStream(Synchronizeable& sync);
    2319      DataStream(DataStream& inStream, DataStream& outStream);
    24       DataStream(Synchronizeable& sync, NetworkSocket& socket);
    25       DataStream(DataStream& inStream, NetworkSocket& socket);
    26       DataStream(Synchronizeable& sync, DataStream& outStream);
    2720     
    2821      ~DataStream();
    29      
    30      
    31      
    32      
    33       void connectNetworkSocket(NetworkSocket& socket);
    34      
    35       void disconnectNetworkSocket();
    36      
    37       void connectSynchronizeable(Synchronizeable& sync);
    38      
    39       void disconnectSynchronizeable();
     22           
    4023
    4124      void connectUpStream(DataStream& upStream);
     
    5942      DataStream* upStream;
    6043      DataStream* downStream;
    61       NetworkSocket* networkSocket;
    62       Synchronizeable* synchronizeable;
    6344
    6445};
  • branches/network/src/lib/network/network_stream.cc

    r5727 r5728  
    9797  /* DOWNSTREAM */
    9898  /* first of all read the synchronizeable's data: */
    99   ret = this->synchronizeable->readBytes(downData);
     99  ret = this->synchronizeables->readBytes(downData);
    100100  /* pass the data to the network socket */
    101101  ret = this->networkSocket->writeBytes(downData, ret);
     
    113113  if( ret != 10) { PRINTF(0)("Error while reading data from the NetworkSocket\n");}
    114114  /* now pass the data to the sync object */
    115   this->synchronizeable->writeBytes(upData, 0);
     115  this->synchronizeables->writeBytes(upData, 0);
    116116 
    117117 
  • branches/network/src/lib/network/network_stream.h

    r5649 r5728  
    2929private:
    3030  //NetworkProtocol* networkProtocol;
    31   NetworkSocket*          networkSockets;
     31  //NetworkSocket*        networkSockets;
    3232  ConnectionMonitor*      connectionMonitor;
    3333 // tList<Synchronizeable>* synchronizeables;
    3434  Synchronizeable*          synchronizeables;
     35  NetworkSocket* networkSocket;
    3536};
    3637#endif /* _NETWORK_STREAM */
Note: See TracChangeset for help on using the changeset viewer.