Panda3D
|
Base functionality for a INET domain Socket This call should be the starting point for all other unix domain sockets. More...
#include "socket_ip.h"
Public Member Functions | |
Socket_IP () | |
Def Constructor. | |
Socket_IP (SOCKET in) | |
Assigns an existing socket to this class. | |
virtual | ~Socket_IP () |
Destructor. | |
bool | Active () |
Ask if the socket is open (allocated) | |
void | Close () |
Closes a socket if it is open (allocated). | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
Socket_Address | GetPeerName (void) const |
Wrapper on berkly getpeername... | |
SOCKET | GetSocket () |
Gets the base socket type. | |
SOCKET | GetSocket () const |
Get The RAW file id of the socket. | |
int | SetBlocking () |
Set the socket to block on subsequent calls to socket functions that address this socket. | |
int | SetNonBlocking () |
this function will throw a socket into non-blocking mode | |
int | SetRecvBufferSize (int size) |
Ok it sets the recv buffer size for both tcp and UDP. | |
bool | SetReuseAddress (bool flag=true) |
Informs a socket to reuse IP address as needed. | |
void | SetSocket (SOCKET ins) |
Assigns an existing socket to this class. | |
bool | SetV6Only (bool flag) |
Sets a flag indicating whether this IPv6 socket should operate in dual-stack mode or not. | |
![]() | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
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. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
TypedObject & | operator= (const TypedObject ©)=default |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static int | GetLastError () |
Gets the last errcode from a socket operation. | |
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. | |
Friends | |
class | Socket_TCP |
class | Socket_TCP_Listen |
class | Socket_TCP_SSL |
class | Socket_UDP |
class | Socket_UDP_Incoming |
class | Socket_UDP_Outgoing |
Additional Inherited Members | |
![]() | |
get_type | |
Base functionality for a INET domain Socket This call should be the starting point for all other unix domain sockets.
SocketIP | ------------------------------------------------------------------- | | | | SocketTCP SocketTCP_Listen SocketUDP_Incoming SocketUDP_OutBound
Definition at line 27 of file socket_ip.h.
|
inline |
Def Constructor.
Definition at line 103 of file socket_ip.h.
|
inline |
Assigns an existing socket to this class.
Definition at line 111 of file socket_ip.h.
|
inlinevirtual |
|
inline |
Ask if the socket is open (allocated)
Definition at line 95 of file socket_ip.h.
Referenced by Close().
|
inline |
Closes a socket if it is open (allocated).
Definition at line 127 of file socket_ip.h.
References Active().
Referenced by Buffered_DatagramConnection::~Buffered_DatagramConnection(), Connection::~Connection(), ~Socket_IP(), ConnectionManager::close_connection(), Socket_UDP_Incoming::InitNoAddress(), Socket_UDP_Outgoing::InitNoAddress(), Socket_UDP_Incoming::OpenForInput(), Socket_UDP_Incoming::OpenForInput(), Socket_UDP_Incoming::OpenForInputMCast(), and SetSocket().
|
inlinevirtual |
Implements TypedObject.
Definition at line 73 of file socket_ip.h.
|
inlinestatic |
Definition at line 62 of file socket_ip.h.
|
inlinevirtual |
Implements TypedObject.
Definition at line 70 of file socket_ip.h.
|
inlinestatic |
Gets the last errcode from a socket operation.
Definition at line 139 of file socket_ip.h.
Referenced by Buffered_DatagramConnection::Flush(), and Socket_UDP_Incoming::GetPacket().
|
inline |
Wrapper on berkly getpeername...
Definition at line 252 of file socket_ip.h.
Referenced by Connection::get_address().
|
inline |
Gets the base socket type.
Definition at line 236 of file socket_ip.h.
Referenced by Socket_fdset::IsSetFor(), and Socket_UDP_Incoming::OpenForInputMCast().
|
inline |
Get The RAW file id of the socket.
Definition at line 244 of file socket_ip.h.
|
inlinestatic |
Definition at line 65 of file socket_ip.h.
|
inlinestatic |
Definition at line 47 of file socket_ip.h.
|
inline |
Set the socket to block on subsequent calls to socket functions that address this socket.
Definition at line 190 of file socket_ip.h.
|
inline |
this function will throw a socket into non-blocking mode
Definition at line 168 of file socket_ip.h.
Referenced by Connection::Connection(), and Socket_TCP::ActiveOpenNonBlocking().
|
inline |
Ok it sets the recv buffer size for both tcp and UDP.
Definition at line 156 of file socket_ip.h.
Referenced by Connection::set_recv_buffer_size().
|
inline |
Informs a socket to reuse IP address as needed.
Definition at line 211 of file socket_ip.h.
Referenced by Socket_TCP::ActiveOpenNonBlocking(), Socket_TCP_Listen::OpenForListen(), Socket_TCP_Listen::OpenForListen(), and Connection::set_reuse_addr().
|
inline |
Assigns an existing socket to this class.
Definition at line 147 of file socket_ip.h.
References Close().
|
inline |
Sets a flag indicating whether this IPv6 socket should operate in dual-stack mode or not.
Definition at line 224 of file socket_ip.h.
Referenced by Socket_UDP_Incoming::InitNoAddress(), Socket_UDP_Incoming::OpenForInput(), and Socket_TCP_Listen::OpenForListen().
|
friend |
Definition at line 54 of file socket_ip.h.
|
friend |
Definition at line 56 of file socket_ip.h.
|
friend |
Definition at line 59 of file socket_ip.h.
|
friend |
Definition at line 55 of file socket_ip.h.
|
friend |
Definition at line 57 of file socket_ip.h.
|
friend |
Definition at line 58 of file socket_ip.h.