32 #ifndef _ESN_IOBUFFER_H_
33 #define _ESN_IOBUFFER_H_
40 #ifndef ESN_MAX_IOBUF_SIZE
41 #define ESN_MAX_IOBUF_SIZE 1024 * 1024 * 256
44 #ifndef ESN_DEFAULT_IOBUF_SIZE
45 #define ESN_DEFAULT_IOBUF_SIZE 2048
63 IoBuffer(
const char* buf,
int bufsize);
81 const char*
data()
const;
107 void flag(
int value);
117 void code(
int value);
127 void type(
int value);
137 void state(
int value);
152 void session(SessionPtr value);
199 int GetBuf(
char* buf,
int len);
205 std::string
GetStr(
int len);
231 void PutBuf(
char* buf,
int len);
236 void PutStr(
const std::string& value);
256 SessionRef m_session;
260 typedef boost::shared_ptr<IoBuffer> IoBufferPtr;
262 typedef std::deque<IoBufferPtr> IoBufferQueue;
266 #endif // _ESN_IOBUFFER_H_
IoBuffer()
Constructor function.
std::string GetStr(int len)
const char * data() const
virtual ~IoBuffer()
Destructor function.
int GetBuf(char *buf, int len)
void SetWritePos(int pos)
void PutDouble(double value)
Buffer class.
Definition: Buffer.h:40
void PutStr(const std::string &value)
IO Buffer class.
Definition: IoBuffer.h:52
void PutBuf(char *buf, int len)