Panda3D
|
Classes | |
struct | AddressQueue |
Public Member Functions | |
Buffered_DatagramConnection (int rbufsize, int wbufsize, int write_flush_point) | |
Return type : inline Argument : bool do_blocking_writes Argument : int rbufsize Argument : int wbufsize. | |
virtual | ~Buffered_DatagramConnection (void) |
Return type : inline Argument : void. | |
void | AddAddress (Socket_Address &inadr) |
must be called to set value to the server | |
size_t | AddressQueueSize () |
void | ClearAddresses (void) |
bool | DoConnect (void) |
bool | Flush (void) |
flush all wrightes | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
bool | GetMessage (Datagram &val) |
read a message | |
bool | IsConnected (void) |
void | Reset (void) |
Reset. | |
bool | SendMessage (const Datagram &msg) |
send the message | |
void | WaitForNetworkReadEvent (PN_stdfloat MaxTime) |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
Protected Member Functions | |
void | ClearAll (void) |
used to do a full reset of buffers | |
virtual void | NewWriteBuffer (void) |
virtual void | PostConnect (void) |
bool | SendMessageBufferOnly (Datagram &msg) |
Friends | |
class | Buffered_DatagramReader |
class | Buffered_DatagramWriter |
Definition at line 31 of file buffered_datagramconnection.h.
Buffered_DatagramConnection::Buffered_DatagramConnection | ( | int | rbufsize, |
int | wbufsize, | ||
int | write_flush_point | ||
) | [inline] |
Return type : inline Argument : bool do_blocking_writes Argument : int rbufsize Argument : int wbufsize.
Definition at line 221 of file buffered_datagramconnection.h.
* Buffered_DatagramConnection::~Buffered_DatagramConnection | ( | void | ) | [inline, virtual] |
Return type : inline Argument : void.
Definition at line 208 of file buffered_datagramconnection.h.
References Socket_IP::Close().
void Buffered_DatagramConnection::AddAddress | ( | Socket_Address & | inadr | ) | [inline] |
must be called to set value to the server
Return type : inline void Argument : Socket_Address &inadr
Definition at line 280 of file buffered_datagramconnection.h.
void Buffered_DatagramConnection::ClearAll | ( | void | ) | [inline, protected] |
used to do a full reset of buffers
Return type : inline void Argument : void
Definition at line 130 of file buffered_datagramconnection.h.
References Socket_IP::Close(), and Buffered_DatagramWriter::ReSet().
Referenced by Flush(), GetMessage(), Reset(), and SendMessage().
bool Buffered_DatagramConnection::Flush | ( | void | ) | [inline] |
flush all wrightes
Return type : bool Argument : void
Definition at line 325 of file buffered_datagramconnection.h.
References ClearAll(), and Socket_IP::GetLastError().
bool Buffered_DatagramConnection::GetMessage | ( | Datagram & | val | ) | [inline] |
read a message
false means something bad happened..
Return type : inline bool Argument : Datagram &val
Definition at line 299 of file buffered_datagramconnection.h.
References ClearAll().
static void Buffered_DatagramConnection::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from Socket_TCP.
Definition at line 109 of file buffered_datagramconnection.h.
References Socket_IP::init_type().
void Buffered_DatagramConnection::Reset | ( | void | ) | [inline] |
Reset.
Return type : void Argument : void
Definition at line 349 of file buffered_datagramconnection.h.
References ClearAll().
bool Buffered_DatagramConnection::SendMessage | ( | const Datagram & | msg | ) | [inline] |
send the message
Return type : inline bool Argument : DataGram &msg
Definition at line 234 of file buffered_datagramconnection.h.
References Buffered_DatagramWriter::AddData(), ClearAll(), Datagram::dump_hex(), Datagram::get_data(), and Datagram::get_length().