5 inline bool Buffered_DatagramReader::
6 GetMessageFromBuffer(
Datagram &inmsg) {
8 size_t DataAvail = FastAmountBeffered();
9 if (DataAvail >=
sizeof(
short)) {
10 char *ff = FastGetMessageHead();
11 unsigned short len=GetUnsignedShort(ff);
12 len +=
sizeof(
unsigned short);
13 if (len <= DataAvail) {
14 inmsg.
assign(ff + 2, len - 2);
void ReSet(void)
Reset all read content, ie.
void assign(const void *data, size_t size)
Replaces the datagram's data with the indicated block.
void ResetContent(void)
Throw away all inread information.
Buffered_DatagramReader(int in_size=8192)
Constructor.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...