1 #ifndef RHESUS_NET_BUFFER_H_
2 #define RHESUS_NET_BUFFER_H_
48 void Write(UINT8* c, UINT16 len);
56 void Write(
string str);
131 int GetBufferLength();
152 void construct(UINT8* buff,
int size);
154 bool AssertBufferHasSpace(UINT32 bits);
156 void InternalWriteByte(
const UINT8 data,
int bit_length);
157 void InternalWriteBytes(
const UINT8 data[],
int bytes);
158 void InternalWriteInteger(
const UINT64 data,
int bits);
160 UINT8 InternalReadByte(
int bit_length);
161 UINT8* InternalReadBytes(
int length);
162 UINT64 InternalReadInteger(
int bits);
164 void FitBufferToSize(UINT32 bits);
166 static const int kBufferResizeOverAllocateBytes;
168 UINT8 * m_internalBuffer;
169 UINT32 m_internalBufferSize;
170 int m_internalBitPos;