source:
orxonox.OLD/trunk/src/lib/network/network_protocol.h
@
8645
Last change on this file since 8645 was 6981, checked in by bensch, 19 years ago | |
---|---|
File size: 760 bytes |
Rev | Line | |
---|---|---|
[5613] | 1 | /*! |
2 | ||
3 | */ | |
4 | ||
5 | #ifndef _NETWORK_PROTOCOL_H | |
6 | #define _NETWORK_PROTOCOL_H | |
7 | ||
[6139] | 8 | /* include base_object.h since all classes are derived from this one */ |
[5613] | 9 | #include "base_object.h" |
10 | ||
[5736] | 11 | /* include this file, it contains some default definitions */ |
12 | #include "netdefs.h" | |
[5735] | 13 | |
14 | typedef struct Header | |
15 | { | |
[6341] | 16 | int synchronizeableID; |
17 | int length; | |
[5735] | 18 | }; |
19 | ||
[5736] | 20 | class Synchronizeable; |
21 | ||
[5613] | 22 | /*! |
23 | ||
24 | */ | |
25 | class NetworkProtocol : virtual public BaseObject | |
26 | { | |
27 | public: | |
28 | NetworkProtocol(); | |
[6981] | 29 | virtual ~NetworkProtocol(); |
[5613] | 30 | |
[6139] | 31 | int createHeader(byte* data, int length, int bufferLength, const Synchronizeable& source); |
[5738] | 32 | Header extractHeader(byte* data, int length); |
[5735] | 33 | |
[5613] | 34 | private: |
[5736] | 35 | unsigned int headerLength; //The Length of the Header in bytes |
[5617] | 36 | }; |
[5613] | 37 | |
38 | #endif //_NETWORK_PROTOCOL_H |
Note: See TracBrowser
for help on using the repository browser.