Fix syntax error in the remote.sh UDEV script
[remote/remote-mci.git] / protocols / client_server / MsgSession.cc
blob3b8981cac070a3f9fa13da021511b09bae48265a
1 #include "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);
27 return buffer;
30 uint8_t* MsgSession::read(uint8_t* buffer, uint32_t& buflen)
32 buffer = readvalue(sessionId,buffer,buflen);
33 return buffer;
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()
44 return sessionId;
47 }}}