#include <connectionSet.h>


Public Types | |
| enum | Event { EVENT_NONE = 0, EVENT_CONNECT, EVENT_DISCONNECT, EVENT_DATA, EVENT_TIMEOUT, EVENT_INTERRUPT, EVENT_ERROR, EVENT_SELECT_ERROR, EVENT_INVALID_HANDLE, EVENT_ALL } |
Public Member Functions | |
| void | addConnection (ConnectionPtr connection) |
| bool | removeConnection (ConnectionPtr connection) |
| void | clear () |
| size_t | size () const |
| bool | empty () const |
| const ConnectionVector & | getConnections () const |
| Event | select (const int timeout=-1) |
| Selects a Connection which is ready for I/O. | |
| void | interrupt () |
| Interrupt the current or next select call. | |
| int | getError () |
| ConnectionPtr | getConnection () |
From the set, a connection with pending events can be selected.
Definition at line 44 of file connectionSet.h.
| EVENT_NONE | No event has occurred. |
| EVENT_CONNECT | A new connection. |
| EVENT_DISCONNECT | A disconnect. |
| EVENT_DATA | Data can be read. |
| EVENT_TIMEOUT | The selection request timed out. |
| EVENT_INTERRUPT | ConnectionSet::interrupt was called. |
| EVENT_ERROR | A connection signaled an error. |
| EVENT_SELECT_ERROR | An error occurred during select(). |
| EVENT_INVALID_HANDLE | A connection is not select'able. |
Definition at line 47 of file connectionSet.h.
| ConnectionSet::Event eq::net::ConnectionSet::select | ( | const int | timeout = -1 |
) |
Selects a Connection which is ready for I/O.
Depending on the event, the error number and connection are set.
| timeout | the timeout to wait for an event in milliseconds, or -1 if the call should block indefinitly. |
Definition at line 145 of file connectionSet.cpp.
References EQERROR, EQVERB, EVENT_CONNECT, EVENT_DATA, EVENT_INVALID_HANDLE, EVENT_NONE, EVENT_SELECT_ERROR, EVENT_TIMEOUT, eq::base::Buffer< T >::getData(), and eq::base::Buffer< T >::getSize().

0.9 by
1.5.8