- Timestamp:
- Nov 28, 2005, 9:07:21 PM (19 years ago)
- Location:
- branches/network/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/connection_monitor.cc
r5800 r5808 74 74 /*Do whats needed for Averaging*/ 75 75 76 if(packetCounter = packetToAverage)76 if(packetCounter == packetToAverage) 77 77 { 78 78 computeCurrentDatarate(); -
branches/network/src/lib/network/data_stream.cc
r5728 r5808 31 31 { 32 32 this->setClassID(CL_DATA_STREAM, "DataStream"); 33 this->upBuffer = new byte[DATA_STREAM_BUFFER_SIZE]; 34 this->downBuffer = new byte[DATA_STREAM_BUFFER_SIZE]; 33 35 } 34 36 … … 41 43 this->downStream = &outStream; 42 44 this->upStream = &inStream; 45 46 if( this->upBuffer) 47 delete[] this->upBuffer; 48 if( this->downBuffer) 49 delete[] this->downBuffer; 43 50 } 44 51 … … 101 108 void passDown(byte* data, int length) 102 109 { 103 110 104 111 } 105 112 … … 115 122 int passUp(byte* data) 116 123 { 117 124 118 125 } -
branches/network/src/lib/network/data_stream.h
r5747 r5808 38 38 int passUp(byte* data); 39 39 40 byte* upBuffer [DATA_STREAM_BUFFER_SIZE];41 byte* downBuffer [DATA_STREAM_BUFFER_SIZE];40 byte* upBuffer; 41 byte* downBuffer; 42 42 unsigned int bufferSize; 43 43 DataStream* upStream; -
branches/network/src/lib/network/network_socket.cc
r5805 r5808 34 34 NetworkSocket::NetworkSocket() 35 35 { 36 this->init(); 37 } 38 39 /** 40 * Constructor to connect directly 41 */ 42 NetworkSocket::NetworkSocket(IPaddress ip) 43 { 44 this->init(); 45 connectToServer(ip); 46 } 47 48 49 void NetworkSocket::init() 50 { 36 51 /* set the class id for the base object */ 37 52 this->setClassID(CL_NETWORK_SOCKET, "NetworkSocket"); … … 58 73 PRINTF(0)("NetworkSocket created\n"); 59 74 60 }61 62 /**63 * Constructor to connect directly64 */65 NetworkSocket::NetworkSocket(IPaddress ip)66 {67 NetworkSocket();68 connectToServer(ip);69 75 } 70 76 … … 255 261 int nbytes = (length<incomingBufferLength) ? length : incomingBufferLength; 256 262 263 257 264 //printf("readBytes: nbytes = %d; length=%d; incomingBufferLength=%d\n", nbytes, length, incomingBufferLength); 258 265 -
branches/network/src/lib/network/network_socket.h
r5804 r5808 83 83 int readBlock(byte * data, int length); 84 84 85 private: 86 void init(); 87 85 88 }; 86 89 -
branches/network/src/subprojects/network/network_unit_test.cc
r5806 r5808 159 159 delete nm; 160 160 161 delete clientSync; 162 delete serverSync; 163 161 164 return 0; 162 165 } -
branches/network/src/subprojects/network/simple_sync.cc
r5806 r5808 31 31 : Synchronizeable(name) 32 32 { 33 /* define the local buffer size */ 33 34 this->outLength = 10; 34 35 this->recLength = 0; … … 37 38 this->inData = new byte[this->inLength]; 38 39 40 /* init the buffer data */ 39 41 for( int i = 0; i < this->outLength; i++) 40 42 { … … 54 56 SimpleSync::~SimpleSync() 55 57 { 58 if( this->outData) 59 delete[] this->outData; 60 if( this->inData) 61 delete[] this->inData; 56 62 } 57 63
Note: See TracChangeset
for help on using the changeset viewer.