1#ifndef __RINGBUFFER_GM_H__
2#define __RINGBUFFER_GM_H__
6class EXPCL_PANDA_NATIVENET RingBuffer :
protected MemBuffer {
10 inline char *GetMessageHead(
void);
11 inline char *GetBufferOpen(
void);
12 inline void ForceWindowSlide(
void);
14#define FastGetMessageHead() (_Buffer + _StartPos)
15#define FastAmountBeffered() (_EndPos - _StartPos)
17 inline bool PutFast(
const char * data,
size_t len);
24 inline RingBuffer(
size_t in_size = 4096);
27 inline bool Put(
const char * data,
size_t len);
28 inline bool Get(
char * data,
size_t len);
31#include "ringbuffer.I"
MemBuffer(void)
default constructor
void Compress(void)
Try and do a intelegent compress of the data space the algorithem is really stupid right know.
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...
size_t BufferAvailabe(void)
Will report amount of data that is contiguas that can be writen at the location returned by GetBuffer...
size_t AmountBuffered(void)
Will report the number of unread chars in buffer.
bool Get(char *data, size_t len)
will copy the data .
void ResetContent(void)
Throw away all inread information.
void FullCompress(void)
Force a compress of the data.