Panda3D
|
Base functionality for a UDP Reader. More...
#include "socket_udp_incoming.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
bool | GetPacket (char *data, int *max_len, Socket_Address &address) |
Grabs a dataset off the listening UDP socket and fills in the source address information. More... | |
bool | InitNoAddress () |
Set this socket to work with out a bound external address. More... | |
bool | OpenForInput (const Socket_Address &address) |
Starts a UDP socket listening on a port. More... | |
bool | OpenForInputMCast (const Socket_Address &address) |
Starts a UDP socket listening on a port. More... | |
bool | SendTo (const char *data, int len, const Socket_Address &address) |
Send data to specified address. More... | |
bool | SetToBroadCast () |
Flips the OS bits that allow for brodcast packets to com in on this port. More... | |
![]() | |
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... | |
![]() | |
TypedObject (const TypedObject ©) | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. More... | |
const TypedObject * | as_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 ©) |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
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 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... | |
Base functionality for a UDP Reader.
Definition at line 14 of file socket_udp_incoming.h.
|
inline |
Grabs a dataset off the listening UDP socket and fills in the source address information.
Return type : bool Argument : char * data Argument : int *max_len Argument : NetAddress & address
Definition at line 137 of file socket_udp_incoming.h.
References Socket_IP::GetLastError().
Referenced by ConnectionReader::shutdown().
|
inline |
Set this socket to work with out a bound external address.
Return type : inline bool Argument : void
Definition at line 66 of file socket_udp_incoming.h.
References Socket_IP::Close().
Referenced by Socket_UDP::InitToAddress().
|
inline |
Starts a UDP socket listening on a port.
Return type : bool Argument : NetAddress & address
Definition at line 83 of file socket_udp_incoming.h.
References Socket_IP::Close().
|
inline |
Starts a UDP socket listening on a port.
Return type : bool Argument : NetAddress & address
Definition at line 103 of file socket_udp_incoming.h.
References Socket_IP::Close(), Socket_Address::get_port(), and Socket_IP::GetSocket().
|
inline |
Send data to specified address.
Return type : inline bool Argument : char * data Argument : int len Argument : NetAddress & address
Definition at line 161 of file socket_udp_incoming.h.
Referenced by Socket_UDP::SendTo().
|
inline |
Flips the OS bits that allow for brodcast packets to com in on this port.
Return type : bool Argument : void
Definition at line 52 of file socket_udp_incoming.h.