| Line | |
|---|
| 1 | /*! |
|---|
| 2 | |
|---|
| 3 | */ |
|---|
| 4 | |
|---|
| 5 | #ifndef _NETWORK_PROTOCOL_H |
|---|
| 6 | #define _NETWORK_PROTOCOL_H |
|---|
| 7 | |
|---|
| 8 | /* include base_object.h since all classes are derived from this one */ |
|---|
| 9 | #include "base_object.h" |
|---|
| 10 | |
|---|
| 11 | /* include this file, it contains some default definitions */ |
|---|
| 12 | #include "netdefs.h" |
|---|
| 13 | |
|---|
| 14 | typedef struct Header |
|---|
| 15 | { |
|---|
| 16 | int synchronizeableID; |
|---|
| 17 | int length; |
|---|
| 18 | }; |
|---|
| 19 | |
|---|
| 20 | class Synchronizeable; |
|---|
| 21 | |
|---|
| 22 | /*! |
|---|
| 23 | |
|---|
| 24 | */ |
|---|
| 25 | class NetworkProtocol : virtual public BaseObject |
|---|
| 26 | { |
|---|
| 27 | ObjectListDeclaration(NetworkProtocol); |
|---|
| 28 | public: |
|---|
| 29 | NetworkProtocol(); |
|---|
| 30 | virtual ~NetworkProtocol(); |
|---|
| 31 | |
|---|
| 32 | int createHeader(byte* data, int length, int bufferLength, const Synchronizeable& source); |
|---|
| 33 | Header extractHeader(byte* data, int length); |
|---|
| 34 | |
|---|
| 35 | private: |
|---|
| 36 | unsigned int headerLength; //The Length of the Header in bytes |
|---|
| 37 | }; |
|---|
| 38 | |
|---|
| 39 | #endif //_NETWORK_PROTOCOL_H |
|---|
Note: See
TracBrowser
for help on using the repository browser.