Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site











SourceForge.net Logo

SocketWaitEvent

 

class SocketWaitEvent

Encapsulates POSIX select call, allowing waiting on set of sockets for specified events.

 

Public Method List

 

void Clear()

Clears the set of socket to wait on.

 


 

void Add(SOCKET s, dword events = WAIT_ALL)

Adds socket s to the set to be waited on specified events. Note that SocketWaitEvent always waits for exceptions.

 


 

void Add(TcpSocket& s, dword events = WAIT_ALL)

Adds TcpSocket s to the list to be waited on specified events. If s is not open, it is not used but its index is reserved anyway (see Get).

 


 

int Wait(int timeout)

Waits for event for timeout ms. If timeout is Null, call is blocking. Returns a number of sockets that signaled an event.

 


 

dword Get(int iconst

dword operator[](int iconst

Returns events that triggered for socket at index i (indicies are specified by order of Add calls) as binary or of WAIT_READ, WAIT_WRITE, WAIT_IS_EXCEPTION (something bad happened, like peer closing the connection). If there were none events for requested socket (or it is not open), returns 0.

 


 

SocketWaitEvent()

Constructor.

 

 

Last edit by cxl on 09/06/2012. Do you want to contribute?. T++