Classes | |
struct | SelectObject |
Typedefs | |
typedef Array< SelectObject > | SelectObjectArray |
Functions | |
int | selectRW (SelectObjectArray &selarray, UInt32 ms) |
int | selectRWEpoll (SelectObjectArray &selarray, const Timeout &timeout) |
int | selectRWPoll (SelectObjectArray &selarray, const Timeout &timeout) |
int | selectRWSelect (SelectObjectArray &selarray, const Timeout &timeout) |
int | selectRW (SelectObjectArray &selarray, const Timeout &timeout=Timeout::infinite) |
Select returns as soon as input or output is available on any of the Select_t objects that are in given array or the timeout has passed. | |
int | select (const SelectTypeArray &selarray, UInt32 ms) BLOCXX_DEPRECATED |
Select returns as soon as input is available on any of Select_t objects that are in given array. | |
int | select (const SelectTypeArray &selarray, const Timeout &timeout) |
Variables | |
const int | SELECT_TIMEOUT = -2 |
The value returned from select when the timeout value has expired. | |
const int | SELECT_ERROR = -1 |
The value returned from select when any error occurs other than timeout. | |
const int | SELECT_NOT_IMPLEMENTED = -4 |
Used internally, but listed here to prevent conflicts. | |
const UInt32 INFINITE_TIMEOUT | BLOCXX_DEPRECATED = ~0U |
Value that means infinite timeout. |
Definition at line 113 of file Select.hpp.
BLOCXX_COMMON_API int BLOCXX_NAMESPACE::Select::select | ( | const SelectTypeArray & | selarray, | |
const Timeout & | timeout | |||
) |
BLOCXX_COMMON_API int BLOCXX_NAMESPACE::Select::select | ( | const SelectTypeArray & | selarray, | |
UInt32 | ms | |||
) |
Select returns as soon as input is available on any of Select_t objects that are in given array.
selarray | An array of Select_t objects that will be used while waiting for input to become available. | |
ms | The timeout value specified in milliseconds |
Referenced by selectRWSelect().
BLOCXX_COMMON_API int BLOCXX_NAMESPACE::Select::selectRW | ( | SelectObjectArray & | selarray, | |
const Timeout & | timeout = Timeout::infinite | |||
) |
Select returns as soon as input or output is available on any of the Select_t objects that are in given array or the timeout has passed.
selarray | An array of Select_t objects that will be used while waiting for input or output to become available. | |
timeout | The timeout. |
BLOCXX_COMMON_API int BLOCXX_NAMESPACE::Select::selectRW | ( | SelectObjectArray & | selarray, | |
UInt32 | ms | |||
) |
Referenced by BLOCXX_NAMESPACE::SocketBaseImpl::connect().
int BLOCXX_NAMESPACE::Select::selectRWEpoll | ( | SelectObjectArray & | selarray, | |
const Timeout & | timeout | |||
) |
Definition at line 186 of file Select.cpp.
References BLOCXX_NAMESPACE::TimeoutTimer::asIntMs(), BLOCXX_ASSERT, BLOCXX_NAMESPACE::TimeoutTimer::expired(), BLOCXX_NAMESPACE::AutoPtrVec< X >::get(), i, BLOCXX_NAMESPACE::TimeoutTimer::loop(), BLOCXX_NAMESPACE::Select::SelectObject::readAvailable, SELECT_ERROR, SELECT_NOT_IMPLEMENTED, SELECT_TIMEOUT, BLOCXX_NAMESPACE::Array< T >::size(), BLOCXX_NAMESPACE::TimeoutTimer::start(), BLOCXX_NAMESPACE::ThreadImpl::testCancel(), BLOCXX_NAMESPACE::Select::SelectObject::waitForRead, BLOCXX_NAMESPACE::Select::SelectObject::waitForWrite, and BLOCXX_NAMESPACE::Select::SelectObject::writeAvailable.
int BLOCXX_NAMESPACE::Select::selectRWPoll | ( | SelectObjectArray & | selarray, | |
const Timeout & | timeout | |||
) |
Definition at line 274 of file Select.cpp.
References BLOCXX_ASSERT, i, SELECT_ERROR, SELECT_NOT_IMPLEMENTED, SELECT_TIMEOUT, BLOCXX_NAMESPACE::Array< T >::size(), and BLOCXX_NAMESPACE::ThreadImpl::testCancel().
int BLOCXX_NAMESPACE::Select::selectRWSelect | ( | SelectObjectArray & | selarray, | |
const Timeout & | timeout | |||
) |
Definition at line 359 of file Select.cpp.
References BLOCXX_ASSERT, BLOCXX_NAMESPACE::TimeoutTimer::expired(), i, BLOCXX_NAMESPACE::TimeoutTimer::loop(), select(), SELECT_ERROR, SELECT_NOT_IMPLEMENTED, SELECT_TIMEOUT, BLOCXX_NAMESPACE::Array< T >::size(), BLOCXX_NAMESPACE::TimeoutTimer::start(), and BLOCXX_NAMESPACE::ThreadImpl::testCancel().
const UInt32 INFINITE_TIMEOUT BLOCXX_NAMESPACE::Select::BLOCXX_DEPRECATED = ~0U |
Value that means infinite timeout.
Definition at line 71 of file Select.hpp.
const int BLOCXX_NAMESPACE::Select::SELECT_ERROR = -1 |
The value returned from select when any error occurs other than timeout.
Definition at line 63 of file Select.hpp.
Referenced by BLOCXX_NAMESPACE::SocketBaseImpl::connect(), selectRWEpoll(), selectRWPoll(), and selectRWSelect().
const int BLOCXX_NAMESPACE::Select::SELECT_NOT_IMPLEMENTED = -4 |
Used internally, but listed here to prevent conflicts.
Definition at line 67 of file Select.hpp.
Referenced by selectRWEpoll(), selectRWPoll(), and selectRWSelect().
const int BLOCXX_NAMESPACE::Select::SELECT_TIMEOUT = -2 |
The value returned from select when the timeout value has expired.
Definition at line 59 of file Select.hpp.
Referenced by BLOCXX_NAMESPACE::SocketBaseImpl::connect(), selectRWEpoll(), selectRWPoll(), and selectRWSelect().