[go: up one dir, main page]

Menu

[r10]: / comm / message.h  Maximize  Restore  History

Download this file

53 lines (41 with data), 922 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef __CB_MESSAGE_H__
#define __CB_MESSAGE_H__
#include <sys/types.h>
#include <iostream>
using namespace std;
class CUserMessage
{
friend class CGMP;
public:
CUserMessage();
CUserMessage(const int& len);
CUserMessage(const CUserMessage& msg);
virtual ~CUserMessage();
public:
int resize(const int& len);
public:
char* m_pcBuffer;
int m_iDataLength;
int m_iBufLength;
};
class CRTMsg: public CUserMessage
{
public:
int32_t getType() const;
void setType(const int32_t& type);
char* getData() const;
void setData(const int& offset, const char* data, const int& len);
public:
static const int m_iHdrSize = 4;
};
class CCBMsg: public CUserMessage
{
public:
int32_t getType() const;
void setType(const int32_t& type);
char* getData() const;
void setData(const int& offset, const char* data, const int& len);
public:
static const int m_iHdrSize = 4;
};
#endif