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

Base functionality for a UDP Sending Socket. More...

#include "socket_udp_outgoing.h"

Inheritance diagram for Socket_UDP_Outgoing:
Socket_IP TypedObject MemoryBase

Public Member Functions

virtual TypeHandle force_init_type ()
 
virtual TypeHandle get_type () const
 
bool InitNoAddress ()
 This will set a udp up for targeted sends. More...
 
bool InitToAddress (const Socket_Address &address)
 Connects the Socket to a Specified address. More...
 
bool Send (const char *data, int len)
 Send data to connected address. More...
 
bool Send (const string &data)
 Send data to connected address. More...
 
bool SendTo (const char *data, int len, const Socket_Address &address)
 Send data to specified address. More...
 
bool SendTo (const string &data, const Socket_Address &address)
 Send data to specified address. More...
 
bool SetToBroadCast ()
 Ask the OS to let us receive BROADCASt packets on this port. More...
 
- Public Member Functions inherited from Socket_IP
 Socket_IP ()
 Def Constructor. More...
 
 Socket_IP (SOCKET in)
 Assigns an existing socket to this class. More...
 
virtual ~Socket_IP ()
 Destructor. More...
 
bool Active ()
 Ask if the socket is open (allocated) More...
 
void Close ()
 closes a socket if it is open (allocated) More...
 
Socket_Address GetPeerName (void) const
 Wrapper on berkly getpeername... More...
 
SOCKET GetSocket ()
 Gets the base socket type. More...
 
SOCKET GetSocket () const
 Get The RAW file id of the socket. More...
 
int SetBlocking ()
 Set the socket to block on subsequent calls to socket functions that address this socket. More...
 
int SetNonBlocking ()
 this function will throw a socket into non-blocking mode More...
 
int SetRecvBufferSize (int size)
 Ok it sets the recv buffer size for both tcp and UDP. More...
 
bool SetReuseAddress (bool flag=true)
 Informs a socket to reuse IP address as needed. More...
 
void SetSocket (SOCKET ins)
 Assigns an existing socket to this class. More...
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
const TypedObjectas_typed_object () const
 Returns the object, upcast (if necessary) to a TypedObject pointer. More...
 
int get_best_parent_from_Set (const std::set< int > &) const
 
int get_type_index () const
 Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. More...
 
bool is_exact_type (TypeHandle handle) const
 Returns true if the current object is the indicated type exactly. More...
 
bool is_of_type (TypeHandle handle) const
 Returns true if the current object is or derives from the indicated type. More...
 
void operator= (const TypedObject &copy)
 

Static Public Member Functions

static TypeHandle get_class_type ()
 
static void init_type ()
 
- Static Public Member Functions inherited from Socket_IP
static TypeHandle get_class_type ()
 
static int GetLastError ()
 gets the last errcode from a socket operation More...
 
static void init_type ()
 
static int InitNetworkDriver ()
 
- Static Public Member Functions inherited from TypedObject
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. More...
 

Detailed Description

Base functionality for a UDP Sending Socket.

Definition at line 14 of file socket_udp_outgoing.h.

Member Function Documentation

bool Socket_UDP_Outgoing::InitNoAddress ( )
inline

This will set a udp up for targeted sends.

Return type : inline bool Argument : void

Definition at line 89 of file socket_udp_outgoing.h.

References Socket_IP::Close().

Referenced by InitToAddress().

bool Socket_UDP_Outgoing::InitToAddress ( const Socket_Address address)
inline

Connects the Socket to a Specified address.

Return type : inline bool Argument : NetAddress & address

Definition at line 72 of file socket_udp_outgoing.h.

References InitNoAddress().

bool Socket_UDP_Outgoing::Send ( const char *  data,
int  len 
)
inline

Send data to connected address.

Return type : inline bool Argument : char * data Argument : int len

Definition at line 107 of file socket_udp_outgoing.h.

Referenced by Send().

bool Socket_UDP_Outgoing::Send ( const string &  data)
inline

Send data to connected address.

Return type : inline bool Argument : const string &data

Definition at line 119 of file socket_udp_outgoing.h.

References Send().

bool Socket_UDP_Outgoing::SendTo ( const char *  data,
int  len,
const Socket_Address address 
)
inline

Send data to specified address.

Return type : inline bool Argument : char * data Argument : int len Argument : NetAddress & address

Definition at line 133 of file socket_udp_outgoing.h.

Referenced by SendTo().

bool Socket_UDP_Outgoing::SendTo ( const string &  data,
const Socket_Address address 
)
inline

Send data to specified address.

Return type : inline bool Argument : const string &data Argument : NetAddress & address

Definition at line 146 of file socket_udp_outgoing.h.

References SendTo().

bool Socket_UDP_Outgoing::SetToBroadCast ( )
inline

Ask the OS to let us receive BROADCASt packets on this port.

Return type : bool Argument : void

Definition at line 57 of file socket_udp_outgoing.h.


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