Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/lib/network/network_protocol.h @ 5735

Last change on this file since 5735 was 5735, checked in by bwuest, 18 years ago

network_protocol.cc and network_protocol.h changed

File size: 691 bytes
Line 
1/*!
2
3*/
4
5#ifndef _NETWORK_PROTOCOL_H
6#define _NETWORK_PROTOCOL_H
7
8#include "base_object.h"
9
10
11typedef struct Header
12{
13  byte protocol;
14  byte version;
15  byte senderID;
16  byte receiverID;
17  byte length;
18  byte* data;
19};
20
21/*!
22
23*/
24class NetworkProtocol : virtual public BaseObject
25{
26  public:
27    NetworkProtocol();
28    ~NetworkProtocol();
29
30    int createHeader(byte* data, int length, int bufferLength, const Synchronizeable& source, unsigned int remoteID);
31    Header ExtractHeader(byte* data, int length);
32
33  private:
34    const unsigned int headerLength = 1; //The Length of the Header in bytes
35    dataFields dFields;
36
37};
38
39#endif //_NETWORK_PROTOCOL_H
Note: See TracBrowser for help on using the repository browser.