Panda3D
 All Classes Functions Variables Enumerations
Public Member Functions | List of all members
Buffered_DatagramWriter Class Reference

This is the buffered writer. More...

#include "buffered_datagramwriter.h"

Inheritance diagram for Buffered_DatagramWriter:
RingBuffer MemBuffer

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)
 Return type : inline int Argument : const void * data Argument : int len Argument : Socket_TCP &sck. More...
 
int AddData (const void *data, size_t len)
 Return type : inline int Argument : const char * data Argument : int len. More...
 
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)
 
size_t BufferAvailabe (void)
 
void Compress (void)
 
void FullCompress (void)
 
bool Get (char *data, size_t len)
 
bool Put (const char *data, size_t len)
 
void ResetContent (void)
 

Detailed Description

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 19 of file buffered_datagramwriter.h.

Member Function Documentation

int Buffered_DatagramWriter::AddData ( const void *  data,
size_t  len,
Socket_TCP sck 
)
inline

Return type : inline int Argument : const void * data Argument : int len Argument : Socket_TCP &sck.

Definition at line 106 of file buffered_datagramwriter.h.

Referenced by Buffered_DatagramConnection::SendMessage().

int Buffered_DatagramWriter::AddData ( const void *  data,
size_t  len 
)
inline

Return type : inline int Argument : const char * data Argument : int len.

Definition at line 131 of file buffered_datagramwriter.h.

void Buffered_DatagramWriter::ReSet ( void  )
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 Return type : void

Definition at line 86 of file buffered_datagramwriter.h.


The documentation for this class was generated from the following file: