Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Nov 20, 2005, 1:23:21 AM (19 years ago)
Author:
patrick
Message:

network: some more constructor/interface work

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

Legend:

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

    r5612 r5648  
    2626 * This is the empty construktor
    2727 */
    28 DataStream::DataStream()
     28DataStream::DataStream(Synchronizeable& sync)
    2929{
     30  this->setClassID(CL_DATA_STREAM, "DataStream");
     31  this->sync = &sync;
    3032                       
    3133}
  • branches/network/src/lib/network/data_stream.h

    r5612 r5648  
    2020      public:
    2121      DataStream();
     22      DataStream(Synchronizeable& sync);
    2223      DataStream(DataStream& inStream, DataStream& outStream);
    2324      DataStream(Synchronizeable& sync, NetworkSocket& socket);
     
    5960      DataStream* downStream;
    6061      NetworkSocket* networkSocket;
     62      Synchronizeable* sync;
    6163
    6264};
  • branches/network/src/lib/network/network_manager.cc

    r5647 r5648  
    126126 * @param synchronizeable: reference to the sync object
    127127 */
    128 NetworkStream& NetworkManager::establishConnection(const IPaddress& address, const Synchronizeable& sync)
     128NetworkStream& NetworkManager::establishConnection(IPaddress& address, Synchronizeable& sync)
    129129{
    130130  PRINTF(0)("Establish connection...\n");
    131131  /* creating a new network stream, it will register itself automaticaly to the class list */
    132 //  NetworkStream* netStream = new NetworkStream();
     132  NetworkStream* netStream = new NetworkStream(address, sync);
    133133}
    134134
  • branches/network/src/lib/network/network_manager.h

    r5647 r5648  
    3333  void shutdown();
    3434 
    35   NetworkStream& establishConnection(const IPaddress& address, const Synchronizeable& sync);
     35  NetworkStream& establishConnection(IPaddress& address, Synchronizeable& sync);
    3636  NetworkStream& establishConnection(const char& hostName, const Synchronizeable& sync);
    3737  void shutdownConnection();
  • branches/network/src/lib/network/network_stream.cc

    r5647 r5648  
    3636
    3737
    38 NetworkStream::NetworkStream(DataStream& inStream, DataStream& outStream)
    39   : DataStream(inStream, outStream)
    40 {
    41   this->init();
    42 }
    43 
    44 NetworkStream::NetworkStream(Synchronizeable& sync, NetworkSocket& socket)
    45   : DataStream(sync, socket)
    46 {
    47   this->init();
    48 }
    49 
    50 NetworkStream::NetworkStream(DataStream& inStream, NetworkSocket& socket)
    51   : DataStream(inStream, socket)
    52 {
    53   this->init();
    54 }
    55 
    56 NetworkStream::NetworkStream(Synchronizeable& sync, DataStream& outStream)
    57   : DataStream(sync, outStream)
    58 {
    59   this->init();
    60 }
    6138
    6239NetworkStream::NetworkStream()
     
    6744  this->synchronizeables = new Synchronizeable();
    6845  this->connectionMonitor = new ConnectionMonitor();
     46}
     47
     48
     49NetworkStream::NetworkStream(IPaddress& address, Synchronizeable& sync)
     50  : DataStream(sync)
     51{
     52  this->init();
     53  this->networkSocket = new NetworkSocket();
    6954}
    7055
  • branches/network/src/lib/network/network_stream.h

    r5647 r5648  
    1818public:
    1919  NetworkStream();
    20   NetworkStream(DataStream& inStream, DataStream& outStream);
    21   NetworkStream(Synchronizeable& sync, NetworkSocket& socket);
    22   NetworkStream(DataStream& inStream, NetworkSocket& socket);
    23   NetworkStream(Synchronizeable& sync, DataStream& outStream);
     20  NetworkStream(IPaddress& address, Synchronizeable& sync);
    2421 
    2522  ~NetworkStream();
Note: See TracChangeset for help on using the changeset viewer.