This is the buffered writer. More...
#include "buffered_datagramwriter.h"
Public Member Functions | |
Buffered_DatagramWriter (size_t in_size, int in_flush_point=-1) | |
int | AddData (const void *data, size_t len, Socket_TCP &sck) |
int | AddData (const void *data, size_t len) |
template<class SOCK_TYPE > | |
int | Flush (SOCK_TYPE &sck) |
template<class SOCK_TYPE > | |
int | FlushNoBlock (SOCK_TYPE &sck) |
void | ReSet (void) |
used to clear the buffrers ... More... | |
Public Member Functions inherited from RingBuffer | |
RingBuffer (size_t in_size=4096) | |
size_t | AmountBuffered (void) |
Will report the number of unread chars in buffer. More... | |
size_t | BufferAvailabe (void) |
Will report amount of data that is contiguas that can be writen at the location returned by GetBufferOpen. More... | |
void | Compress (void) |
Try and do a intelegent compress of the data space the algorithem is really stupid right know. More... | |
void | FullCompress (void) |
Force a compress of the data. More... | |
bool | Get (char *data, size_t len) |
will copy the data . More... | |
bool | Put (const char *data, size_t len) |
Adds Data to a ring Buffer Will do a compress if needed so pointers suplied by Get Call are no longer valide. More... | |
void | ResetContent (void) |
Throw away all inread information. More... | |
This is the buffered writer.
. it is used to buffer up Coremessages and arbitrary data..
GmCoreMessage
You must commit all rights to a socket with flush and flush may be called internall if the buffersize is about to overrun.. This class does guaranty no partial message rights at least to the TCP layer..
Definition at line 18 of file buffered_datagramwriter.h.
|
inline |
used to clear the buffrers ...
use of this in mid stream is a very bad thing as you can not guarany network writes are message alligned
Definition at line 82 of file buffered_datagramwriter.h.
References RingBuffer::ResetContent().