Panda3D
Public Member Functions | Static Public Member Functions | List of all members
BufferedDatagramConnection Class Reference

there are 3 states More...

Inheritance diagram for BufferedDatagramConnection:
SocketTCP SocketIP TypedObject MemoryBase

Public Member Functions

 __init__ (int rbufsize, int wbufsize, int write_flush_point)
 Function name : Buffered_DatagramConnection::Buffered_DatagramConnection. More...
 
 AddAddress (SocketAddress inadr)
 Function name : Buffered_DatagramConnection::Init must be called to set value to the server. More...
 
size_t AddressQueueSize ()
 address queue stuff More...
 
 ClearAddresses ()
 
bool DoConnect ()
 all the real state magic is in here More...
 
bool Flush ()
 Function name : Buffered_DatagramConnection::Flush flush all wrightes. More...
 
bool GetMessage (Datagram val)
 Function name : Buffered_DatagramConnection::GetMessage read a message. More...
 
bool IsConnected ()
 all the real state magic is in here More...
 
 Reset ()
 Function name : Buffered_DatagramConnection::Reset Reset. More...
 
bool SendMessage (const Datagram msg)
 Function name : Buffered_DatagramConnection::SendMessage send the message. More...
 
 WaitForNetworkReadEvent (float MaxTime)
 
- Public Member Functions inherited from SocketTCP
 __init__ ()
 
 __init__ (SOCKET)
 Function name : Socket_TCP::Socket_TCP. More...
 
bool ActiveOpen (const SocketAddress theaddress, bool setdelay)
 Function name : ActiveOpen This function will try and set the socket up for active open to a specified address and port provided by the input parameter. More...
 
bool ActiveOpenNonBlocking (const SocketAddress theaddress)
 Function name : ActiveOpenNonBlocking This function will try and set the socket up for active open to a specified address and port provided by the input parameter (non-blocking version) More...
 
int DontLinger ()
 Function name : Socket_TCP::DontLinger Turn off the linger flag. The socket will quickly release buffered items and free up OS resources. You may lose a stream if you use this flag and do not negotiate the close at the application layer. More...
 
bool ErrorIsWouldBlocking (int err)
 
str RecvData (int max_len)
 Function name : Socket_TCP::RecvData Read the data from the connection. More...
 
int SendData (str str)
 
int SetLinger (int interval_seconds)
 Function name : SetLinger will control the behavior of SO_LINGER for a TCP socket. More...
 
int SetNoDelay (bool flag)
 Function name : SetNoDelay Disable Nagle algorithm. Don't delay send to coalesce packets. More...
 
int SetSendBufferSize (int insize)
 Function name : SetSendBufferSize Just like it sounds. Sets a buffered socket recv buffer size. This function does not refuse ranges outside hard-coded OS limits. More...
 
bool ShutdownSend ()
 
- Public Member Functions inherited from SocketIP
 __init__ ()
 Function name : Socket_IP::Socket_IP Def Constructor. More...
 
 __init__ (SOCKET in)
 Function name : Socket_IP::SetSocket Assigns an existing socket to this class. More...
 
bool Active ()
 Function name : Socket_IP::Active Ask if the socket is open (allocated) More...
 
 Close ()
 Function name : Socket_IP::Close closes a socket if it is open (allocated) More...
 
SocketAddress GetPeerName ()
 Function name : Socket_IP::GetPeerName Wrapper on berkly getpeername... More...
 
SOCKET GetSocket ()
 Function name : Socket_IP::GetSocket Gets the base socket type. More...
 
SOCKET GetSocket ()
 Function name : Socket_IP::GetSocket Get The RAW file id of the socket. More...
 
int SetBlocking ()
 Function name : Socket_IP::SetBlocking Set the socket to block on subsequent calls to socket functions that address this socket. More...
 
int SetNonBlocking ()
 Function name : SetNonBlocking this function will throw a socket into non-blocking mode. More...
 
int SetRecvBufferSize (int size)
 Function name : Socket_IP::SetRecvBufferSize Ok it sets the recv buffer size for both tcp and UDP. More...
 
bool SetReuseAddress (bool flag)
 Function name : SetReuseAddress Informs a socket to reuse IP address as needed. More...
 
 SetSocket (SOCKET ins)
 Function name : Socket_IP::SetSocket Assigns an existing socket to this class. More...
 
- Public Member Functions inherited from TypedObject
TypeHandle getType ()
 Derived classes should override this function to return get_class_type(). More...
 
int getTypeIndex ()
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. This is equivalent to get_type().get_index(). More...
 
bool isExactType (TypeHandle handle)
 Returns true if the current object is the indicated type exactly. More...
 
bool isOfType (TypeHandle handle)
 Returns true if the current object is or derives from the indicated type. More...
 

Static Public Member Functions

static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from SocketTCP
static TypeHandle getClassType ()
 
- Static Public Member Functions inherited from SocketIP
static TypeHandle getClassType ()
 
static int GetLastError ()
 Function name : Socket_IP::GetLastError gets the last errcode from a socket operation. More...
 
static int InitNetworkDriver ()
 
- Static Public Member Functions inherited from TypedObject
static TypeHandle getClassType ()
 

Detailed Description

there are 3 states

  1. Socket not even assigned,,,,
  2. Socket Assigned and trying to get a active connect open
  3. Socket is open and writable.. ( Fully powered up )...

Member Function Documentation

◆ __init__()

__init__ ( int  rbufsize,
int  wbufsize,
int  write_flush_point 
)

Function name : Buffered_DatagramConnection::Buffered_DatagramConnection.

Return type : inline Argument : bool do_blocking_writes Argument : int rbufsize Argument : int wbufsize

◆ AddAddress()

AddAddress ( SocketAddress  inadr)

Function name : Buffered_DatagramConnection::Init must be called to set value to the server.

Return type : inline void Argument : Socket_Address &inadr

◆ AddressQueueSize()

size_t AddressQueueSize ( )

address queue stuff

◆ ClearAddresses()

ClearAddresses ( )

◆ DoConnect()

bool DoConnect ( )

all the real state magic is in here

◆ Flush()

bool Flush ( )

Function name : Buffered_DatagramConnection::Flush flush all wrightes.

Return type : bool Argument : void

◆ getClassType()

static TypeHandle getClassType ( )
static

◆ GetMessage()

bool GetMessage ( Datagram  val)

Function name : Buffered_DatagramConnection::GetMessage read a message.

false means something bad happened..

Return type : inline bool Argument : Datagram &val

◆ IsConnected()

bool IsConnected ( )

all the real state magic is in here

◆ Reset()

Reset ( )

Function name : Buffered_DatagramConnection::Reset Reset.

Return type : void Argument : void

◆ SendMessage()

bool SendMessage ( const Datagram  msg)

Function name : Buffered_DatagramConnection::SendMessage send the message.

Return type : inline bool Argument : DataGram &msg

◆ WaitForNetworkReadEvent()

WaitForNetworkReadEvent ( float  MaxTime)