23 #ifndef INPUTMESSAGE_H
24 #define INPUTMESSAGE_H
40 void setBuffer(
const std::string& buffer);
41 std::string
getBuffer() {
return std::string((
char*)m_buffer + m_headerPos, m_messageSize); }
61 int getUnreadSize() {
return m_messageSize - (m_readPos - m_headerPos); }
64 bool eof() {
return (m_readPos - m_headerPos) >= m_messageSize; }
84 bool canRead(
int bytes);
85 void checkRead(
int bytes);
86 void checkWrite(
int bytes);