- Timestamp:
- Nov 23, 2005, 2:40:24 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_stream.cc
r5721 r5723 19 19 */ 20 20 #define DEBUG_MODULE_NETWORK 21 21 #define PACKAGE_SIZE = 8 22 22 23 23 #include "base_object.h" … … 43 43 /* initialize the references */ 44 44 this->networkSocket = new NetworkSocket(); 45 this->synchronizeables = new Synchronizeable();45 this->synchronizeables = NULL; 46 46 this->connectionMonitor = new ConnectionMonitor(); 47 47 } … … 53 53 this->init(); 54 54 this->networkSocket = new NetworkSocket(/* address, type */); 55 this->networkSocket->connectToServer(address, 88); 56 57 this->synchronizeables = &sync; 55 58 } 56 59 … … 61 64 this->init(); 62 65 this->networkSocket = new NetworkSocket(/* address, type */); 66 67 this->synchronizeables = &sync; 63 68 } 64 69 … … 73 78 NetworkStream::~NetworkStream() 74 79 { 80 81 networkSocket->disconnectServer(); 82 75 83 delete networkSocket; 76 delete synchronizeable;77 84 delete connectionMonitor; 78 85 … … 82 89 { 83 90 91 84 92 int ret = 0; 85 86 93 87 94 byte downData[10]; … … 99 106 /* UPSTREAM */ 100 107 /* first read 10bytes of data (debug) */ 101 ret = this->networkSocket->readBytes(upData, 0);108 //while(ret == 0) { ret = this->networkSocket->readBytes(upData,PACKAGE_SIZE);} 102 109 /* error checking: data read? */ 103 110 if( ret != 10) { PRINTF(0)("Error while reading data from the NetworkSocket\n");}
Note: See TracChangeset
for help on using the changeset viewer.