1 #include "protocols/client_server/MsgSession.h"
3 namespace remote
{ namespace protocols
{ namespace client_server
{
5 MsgSession::MsgSession(dbkey_t sessionId
) : sessionId(sessionId
)
9 MsgSession::MsgSession(uint8_t* buffer
, uint32_t& buflen
)
11 this->read(buffer
,buflen
);
14 MsgSession::~MsgSession()
19 uint32_t MsgSession::getLength()
21 return sizeof(sessionId
);
24 uint8_t* MsgSession::write(uint8_t* buffer
, uint32_t& buflen
)
26 buffer
= writevalue(sessionId
,buffer
,buflen
);
30 uint8_t* MsgSession::read(uint8_t* buffer
, uint32_t& buflen
)
32 buffer
= readvalue(sessionId
,buffer
,buflen
);
36 void MsgSession::print(FILE* s
)
38 fprintf(s
,"MESSAGE MsgSession\n");
39 fprintf(s
,"Session ID: %u\n",sessionId
);
42 dbkey_t
MsgSession::getSessionId()