Changeset 5648 in orxonox.OLD for branches/network/src
- Timestamp:
- Nov 20, 2005, 1:23:21 AM (19 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/data_stream.cc
r5612 r5648 26 26 * This is the empty construktor 27 27 */ 28 DataStream::DataStream( )28 DataStream::DataStream(Synchronizeable& sync) 29 29 { 30 this->setClassID(CL_DATA_STREAM, "DataStream"); 31 this->sync = &sync; 30 32 31 33 } -
branches/network/src/lib/network/data_stream.h
r5612 r5648 20 20 public: 21 21 DataStream(); 22 DataStream(Synchronizeable& sync); 22 23 DataStream(DataStream& inStream, DataStream& outStream); 23 24 DataStream(Synchronizeable& sync, NetworkSocket& socket); … … 59 60 DataStream* downStream; 60 61 NetworkSocket* networkSocket; 62 Synchronizeable* sync; 61 63 62 64 }; -
branches/network/src/lib/network/network_manager.cc
r5647 r5648 126 126 * @param synchronizeable: reference to the sync object 127 127 */ 128 NetworkStream& NetworkManager::establishConnection( const IPaddress& address, constSynchronizeable& sync)128 NetworkStream& NetworkManager::establishConnection(IPaddress& address, Synchronizeable& sync) 129 129 { 130 130 PRINTF(0)("Establish connection...\n"); 131 131 /* 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); 133 133 } 134 134 -
branches/network/src/lib/network/network_manager.h
r5647 r5648 33 33 void shutdown(); 34 34 35 NetworkStream& establishConnection( const IPaddress& address, constSynchronizeable& sync);35 NetworkStream& establishConnection(IPaddress& address, Synchronizeable& sync); 36 36 NetworkStream& establishConnection(const char& hostName, const Synchronizeable& sync); 37 37 void shutdownConnection(); -
branches/network/src/lib/network/network_stream.cc
r5647 r5648 36 36 37 37 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 }61 38 62 39 NetworkStream::NetworkStream() … … 67 44 this->synchronizeables = new Synchronizeable(); 68 45 this->connectionMonitor = new ConnectionMonitor(); 46 } 47 48 49 NetworkStream::NetworkStream(IPaddress& address, Synchronizeable& sync) 50 : DataStream(sync) 51 { 52 this->init(); 53 this->networkSocket = new NetworkSocket(); 69 54 } 70 55 -
branches/network/src/lib/network/network_stream.h
r5647 r5648 18 18 public: 19 19 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); 24 21 25 22 ~NetworkStream();
Note: See TracChangeset
for help on using the changeset viewer.