- Timestamp:
- Nov 23, 2005, 3:19:45 PM (19 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_protocol.cc
r5735 r5736 24 24 #include "network_protocol.h" 25 25 26 /* include th is file, it contains some default definitions*/27 #include " netdefs.h"26 /* include the synchronizeable object */ 27 #include "synchronizeable.h" 28 28 29 29 /* include this file for debugging */ … … 41 41 /* set the class id for the base object */ 42 42 this->setClassID(CL_NETWORK_PROTOCOL, "NetworkProtocol"); 43 this->headerLength = HEADER_LENGTH; 43 44 } 44 45 … … 60 61 * -1 if there isn't enough space in the buffer for the header 61 62 */ 62 NetworkProtocol::createHeader(byte* data, int length, int bufferLength, const Synchronizeable& source, unsigned int remoteID)63 int NetworkProtocol::createHeader(byte* data, int length, int bufferLength, const Synchronizeable& source, unsigned int remoteID) 63 64 { 64 65 //If there isn't enough space for the header return -1 … … 87 88 PRINTF(0)("Received data is to short; it can't contain a header!"); 88 89 Header h; 89 h.protocol = -1;90 h.protocol = 0; 90 91 return h; 91 92 } -
branches/network/src/lib/network/network_protocol.h
r5735 r5736 8 8 #include "base_object.h" 9 9 10 /* include this file, it contains some default definitions */ 11 #include "netdefs.h" 12 13 #define HEADER_LENGTH 1 10 14 11 15 typedef struct Header … … 18 22 byte* data; 19 23 }; 24 25 class Synchronizeable; 20 26 21 27 /*! … … 32 38 33 39 private: 34 const unsigned int headerLength = 1; //The Length of the Header in bytes 35 dataFields dFields; 36 40 unsigned int headerLength; //The Length of the Header in bytes 37 41 }; 38 42
Note: See TracChangeset
for help on using the changeset viewer.