BLOCXX_NAMESPACE::Select Namespace Reference


Classes

struct  SelectObject

Typedefs

typedef Array< SelectObjectSelectObjectArray

Functions

int selectRWEpoll (SelectObjectArray &selarray, UInt32 ms)
int selectRWPoll (SelectObjectArray &selarray, UInt32 ms)
int selectRWSelect (SelectObjectArray &selarray, UInt32 ms)
int selectRW (SelectObjectArray &selarray, UInt32 ms=INFINITE_TIMEOUT)
 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=INFINITE_TIMEOUT)
 Select returns as soon as input is available on any of Select_t objects that are in given array.

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_INTERRUPTED = -3
 The value returned from select when select is interrupted by a signal.
const int SELECT_NOT_IMPLEMENTED = -4
 Used internally, but listed here to prevent conflicts.
const UInt32 INFINITE_TIMEOUT = ~0U
 Value that means infinite timeout.


Typedef Documentation

typedef Array<SelectObject> BLOCXX_NAMESPACE::Select::SelectObjectArray
 

Definition at line 112 of file Select.hpp.


Function Documentation

int BLOCXX_NAMESPACE::Select::select const SelectTypeArray selarray,
UInt32  ms = INFINITE_TIMEOUT
 

Select returns as soon as input is available on any of Select_t objects that are in given array.

Parameters:
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
Returns:
On success, the index in the selarray of the first Select_t object that input has become available on. SELECT_ERROR on error. SELECT_TIMEOUT if the given timeout value has expired.

Definition at line 538 of file Select.cpp.

References i, BLOCXX_NAMESPACE::Array< T >::push_back(), BLOCXX_NAMESPACE::Array< T >::reserve(), and BLOCXX_NAMESPACE::Array< T >::size().

Referenced by BLOCXX_NAMESPACE::SelectEngine::go(), selectRWSelect(), and BLOCXX_NAMESPACE::ThreadImpl::sleep().

int BLOCXX_NAMESPACE::Select::selectRW SelectObjectArray selarray,
UInt32  ms = INFINITE_TIMEOUT
 

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.

Parameters:
selarray An array of Select_t objects that will be used while waiting for input or output to become available.
ms The timeout value specified in milliseconds
Returns:
On success, the number of descriptors available. SELECT_ERROR on error. SELECT_TIMEOUT if the given timeout value has expired. The input and output out parameters are modified to indicate which descriptors are available.

Definition at line 515 of file Select.cpp.

References BLOCXX_ASSERT, SELECT_NOT_IMPLEMENTED, selectRWEpoll(), selectRWPoll(), and selectRWSelect().

Referenced by BLOCXX_NAMESPACE::SocketUtils::waitForIO().

int BLOCXX_NAMESPACE::Select::selectRWEpoll SelectObjectArray selarray,
UInt32  ms
 

Definition at line 168 of file Select.cpp.

References BLOCXX_ASSERT, BLOCXX_NAMESPACE::FileSystem::close(), i, SELECT_ERROR, SELECT_NOT_IMPLEMENTED, and BLOCXX_NAMESPACE::Array< T >::size().

Referenced by selectRW().

int BLOCXX_NAMESPACE::Select::selectRWPoll SelectObjectArray selarray,
UInt32  ms
 

Definition at line 277 of file Select.cpp.

References BLOCXX_ASSERT, i, BLOCXX_NAMESPACE::Exec::INFINITE_TIMEOUT, BLOCXX_NAMESPACE::Array< T >::size(), and BLOCXX_NAMESPACE::ThreadImpl::testCancel().

Referenced by selectRW().

int BLOCXX_NAMESPACE::Select::selectRWSelect SelectObjectArray selarray,
UInt32  ms
 

Definition at line 388 of file Select.cpp.

References BLOCXX_ASSERT, i, BLOCXX_NAMESPACE::Exec::INFINITE_TIMEOUT, select(), SELECT_ERROR, BLOCXX_NAMESPACE::Array< T >::size(), and BLOCXX_NAMESPACE::ThreadImpl::testCancel().

Referenced by selectRW().


Variable Documentation

const UInt32 BLOCXX_NAMESPACE::Select::INFINITE_TIMEOUT = ~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 59 of file Select.hpp.

Referenced by BLOCXX_NAMESPACE::SelectEngine::go(), selectRWEpoll(), and selectRWSelect().

const int BLOCXX_NAMESPACE::Select::SELECT_INTERRUPTED = -3
 

The value returned from select when select is interrupted by a signal.

Definition at line 63 of file Select.hpp.

Referenced by BLOCXX_NAMESPACE::SelectEngine::go().

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 selectRW(), and selectRWEpoll().

const int BLOCXX_NAMESPACE::Select::SELECT_TIMEOUT = -2
 

The value returned from select when the timeout value has expired.

Definition at line 55 of file Select.hpp.

Referenced by BLOCXX_NAMESPACE::SelectEngine::go(), and BLOCXX_NAMESPACE::SocketUtils::waitForIO().


Generated on Fri Jun 16 15:39:12 2006 for blocxx by  doxygen 1.4.6