Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Socket_Selector Struct Reference

Public Member Functions

 Socket_Selector (const Socket_fdset &fd)
 
int WaitFor (const Time_Span &timeout)
 This function is the reason this call exists.
 
int WaitFor_All (const Socket_fdset &fd, const Time_Span &timeout)
 Helper function to utilize the WaitFor function.
 
int WaitFor_Read_Error (const Socket_fdset &fd, const Time_Span &timeout)
 Helper function for WaitFor Only looks for readability and errors.
 
int WaitFor_Write_Error (const Socket_fdset &fd, const Time_Span &timeout)
 Helper function for WaitFor Only looks for writability and errors.
 

Public Attributes

int _answer
 
Socket_fdset _error
 
Socket_fdset _read
 
Socket_fdset _write
 

Detailed Description

Definition at line 6 of file socket_selector.h.

Constructor & Destructor Documentation

◆ Socket_Selector() [1/2]

Socket_Selector::Socket_Selector ( )
inline

Definition at line 13 of file socket_selector.h.

◆ Socket_Selector() [2/2]

Socket_Selector::Socket_Selector ( const Socket_fdset & fd)
inline

Definition at line 17 of file socket_selector.h.

Member Function Documentation

◆ WaitFor()

int Socket_Selector::WaitFor ( const Time_Span & timeout)
inline

This function is the reason this call exists.

. It will wait for a read, write or error condition on a socket or it will time out

Definition at line 31 of file socket_selector.h.

Referenced by WaitFor_All(), WaitFor_Read_Error(), and WaitFor_Write_Error().

◆ WaitFor_All()

int Socket_Selector::WaitFor_All ( const Socket_fdset & fd,
const Time_Span & timeout )
inline

Helper function to utilize the WaitFor function.

Definition at line 49 of file socket_selector.h.

References WaitFor().

◆ WaitFor_Read_Error()

int Socket_Selector::WaitFor_Read_Error ( const Socket_fdset & fd,
const Time_Span & timeout )
inline

Helper function for WaitFor Only looks for readability and errors.

Definition at line 60 of file socket_selector.h.

References Socket_fdset::clear(), and WaitFor().

◆ WaitFor_Write_Error()

int Socket_Selector::WaitFor_Write_Error ( const Socket_fdset & fd,
const Time_Span & timeout )
inline

Helper function for WaitFor Only looks for writability and errors.

Definition at line 71 of file socket_selector.h.

References Socket_fdset::clear(), and WaitFor().

Member Data Documentation

◆ _answer

int Socket_Selector::_answer

Definition at line 11 of file socket_selector.h.

◆ _error

Socket_fdset Socket_Selector::_error

Definition at line 10 of file socket_selector.h.

◆ _read

Socket_fdset Socket_Selector::_read

Definition at line 8 of file socket_selector.h.

◆ _write

Socket_fdset Socket_Selector::_write

Definition at line 9 of file socket_selector.h.


The documentation for this struct was generated from the following file: