Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Socket_TCP_Listen Class Reference

Base functionality for a TCP rendezvous socket. More...

#include "socket_tcp_listen.h"

Inheritance diagram for Socket_TCP_Listen:
Socket_IP TypedObject MemoryBase

Public Member Functions

virtual TypeHandle force_init_type ()
 
virtual TypeHandle get_type () const
 
bool GetIncomingConnection (SOCKET &newsession, Socket_Address &address)
 This function is used to accept new connections.
 
bool GetIncomingConnection (Socket_TCP &newsession, Socket_Address &address)
 
bool OpenForListen (const Socket_Address &address, int backlog_size=1024)
 This function will initialize a listening Socket.
 
bool OpenForListen (unsigned short port, int backlog_size=1024)
 This function will initialize a listening Socket.
 
- Public Member Functions inherited from Socket_IP
 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).
 
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.
 
- Public Member Functions inherited from TypedObject
 TypedObject (const TypedObject &copy)=default
 
TypedObjectas_typed_object ()
 Returns the object, upcast (if necessary) to a TypedObject pointer.
 
const TypedObjectas_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.
 
TypedObjectoperator= (const TypedObject &copy)=default
 
- Public Member Functions inherited from MemoryBase
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 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.
 
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.
 

Additional Inherited Members

- Public Attributes inherited from TypedObject
 get_type
 

Detailed Description

Base functionality for a TCP rendezvous socket.

Definition at line 11 of file socket_tcp_listen.h.

Constructor & Destructor Documentation

◆ Socket_TCP_Listen()

Socket_TCP_Listen::Socket_TCP_Listen ( )
inline

Definition at line 14 of file socket_tcp_listen.h.

◆ ~Socket_TCP_Listen()

Socket_TCP_Listen::~Socket_TCP_Listen ( )
inline

Definition at line 15 of file socket_tcp_listen.h.

Member Function Documentation

◆ force_init_type()

virtual TypeHandle Socket_TCP_Listen::force_init_type ( )
inlinevirtual

Reimplemented from Socket_IP.

Definition at line 35 of file socket_tcp_listen.h.

◆ get_class_type()

static TypeHandle Socket_TCP_Listen::get_class_type ( )
inlinestatic

Definition at line 24 of file socket_tcp_listen.h.

◆ get_type()

virtual TypeHandle Socket_TCP_Listen::get_type ( ) const
inlinevirtual

Reimplemented from Socket_IP.

Definition at line 32 of file socket_tcp_listen.h.

◆ GetIncomingConnection() [1/2]

bool Socket_TCP_Listen::GetIncomingConnection ( SOCKET & newsession,
Socket_Address & address )
inline

This function is used to accept new connections.

Definition at line 97 of file socket_tcp_listen.h.

◆ GetIncomingConnection() [2/2]

bool Socket_TCP_Listen::GetIncomingConnection ( Socket_TCP & newsession,
Socket_Address & address )
inline

Definition at line 106 of file socket_tcp_listen.h.

◆ init_type()

static void Socket_TCP_Listen::init_type ( )
inlinestatic

Definition at line 27 of file socket_tcp_listen.h.

◆ OpenForListen() [1/2]

bool Socket_TCP_Listen::OpenForListen ( const Socket_Address & address,
int backlog_size = 1024 )
inline

This function will initialize a listening Socket.

Definition at line 75 of file socket_tcp_listen.h.

References Socket_Address::get_family(), and Socket_IP::SetReuseAddress().

◆ OpenForListen() [2/2]

bool Socket_TCP_Listen::OpenForListen ( unsigned short port,
int backlog_size = 1024 )
inline

This function will initialize a listening Socket.

Definition at line 44 of file socket_tcp_listen.h.

References Socket_Address::set_any_IP(), Socket_Address::set_any_IPv6(), Socket_IP::SetReuseAddress(), and Socket_IP::SetV6Only().


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