SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Encapsulates socket conditions. More...
#include <rw/secsock/RWSecureSocketAttribute.h>
RWSecureSocketAttribute encapsulates socket conditions.
These are the attributes of a socket connection. These conditions may be ORed together. For example, the attribute sock_attr_canread|sock_attr_canwrite on a socket indicates that both the attributes are set for the underlying socket.
RWSecureSocketAttribute::RWSecureSocketAttribute | ( | void | ) |
Constructs a null attribute on the undefined socket.
RWSecureSocketAttribute::RWSecureSocketAttribute | ( | const RWSecureSocket & | socket, | |
Attribute | attribute = sock_attr_nil | |||
) |
Constructs an attribute for a particular socket.
RWSecureSocketAttribute::RWSecureSocketAttribute | ( | const RWSecureSocketAttribute & | second | ) |
Copy constructor.
RWSecureSocketAttribute::~RWSecureSocketAttribute | ( | void | ) |
Destructor.
RWSecureSocketAttribute::Attribute RWSecureSocketAttribute::getAttribute | ( | void | ) | const [inline] |
Returns the attribute with which self
is associated. The returned attribute may be a composite of several attributes ORed
together.
RWSecureSocket RWSecureSocketAttribute::getSocket | ( | void | ) | const [inline] |
Returns the socket with which the attribute is associated.
bool RWSecureSocketAttribute::operator< | ( | const RWSecureSocketAttribute & | s | ) | const |
Defined to satisfy some C++ compilers. Should never be invoked by application code. Invoking this operator causes an exception to be thrown.
RWSecureSocketAttribute& RWSecureSocketAttribute::operator= | ( | const RWSecureSocketAttribute & | second | ) |
Assignment operator.
bool operator== | ( | const RWSecureSocketAttribute & | x, | |
const RWSecureSocketAttribute & | y | |||
) | [related] |
Returns true
if x and y refer to the same attribute on the same socket.
RWTValOrderedVector< RWSecureSocketAttribute > rwSecureSocketSelect | ( | const RWTValOrderedVector< RWSecureSocketAttribute > & | , | |
double | timeout | |||
) | [related] |
This function helps to perform asynchronous socket input/output operations. It waits for one of the conditions in the user-defined attributes vector to occur, and returns a vector of the conditions that have occurred. If any of the conditions has already occurred when the function is called, it returns immediately.
The attributes parameter is a vector of secure socket attributes. If empty, the program may sleep indefinitely. If one of the attributes refers to an invalid socket, a RWSecureSocketInvalidSocketError exception is thrown. If more than FD_SETSIZE
attributes are in the attributes vector, an exception is thrown.
This function is guaranteed to block up to timeout seconds while waiting for a condition to become true. If the parameter has a value less than 0, the method blocks indefinitely waiting for a condition to become true. If the value is greater than LONG_MAX
, it will be truncated to LONG_MAX
. Note that when using large timeout values, the fractional part may change due to rounding.
RWTValOrderedVector< RWSecureSocketAttribute > rwSecureSocketSelect | ( | const RWTValOrderedVector< RWSecureSocketAttribute > & | attributes | ) | [related] |
This function helps to perform asynchronous socket input/output operations. It waits for one of the conditions in the user-defined attributes vector to occur, and returns a vector of the conditions that have occurred. If any of the conditions has already occurred when the function is called, it returns immediately.
The attributes parameter is a vector of secure socket attributes. If empty, the program may sleep indefinitely. If one of the attributes refers to an invalid socket, a RWSecureSocketInvalidSocketError exception is thrown. If more than FD_SETSIZE
attributes are in the attributes vector, an exception is thrown.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.