SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Represents a set of attributes on a socket. More...
#include <rw/network/RWTSocketAttribute.h>
Public Types | |
enum | Attribute { NIL, CANREAD, CANWRITE, RWEXCEPTION, ISEXCEPTION, EXCEPTION, ISCONNECTED, CANACCEPT, ANY, sock_attr_nil, sock_attr_canread, sock_attr_canwrite, sock_attr_exception, sock_attr_isconnected, sock_attr_canaccept, sock_attr_any } |
Public Member Functions | |
RWTSocketAttribute () | |
RWTSocketAttribute (const Socket &socket, Attribute attribute=sock_attr_nil) | |
RWTSocketAttribute (const RWTSocketAttribute &rhs) | |
~RWTSocketAttribute (void) | |
Attribute | getAttribute () const |
Socket | getSocket () const |
RWTSocketAttribute & | operator= (const RWTSocketAttribute &rhs) |
Friends | |
Attribute | operator& (Attribute lhs, Attribute rhs) |
Attribute & | operator&= (Attribute &lhs, Attribute rhs) |
Attribute | operator^ (Attribute lhs, Attribute rhs) |
Attribute & | operator^= (Attribute &lhs, Attribute rhs) |
Attribute | operator| (Attribute lhs, Attribute rhs) |
Attribute & | operator|= (Attribute &lhs, Attribute rhs) |
Attribute | operator~ (Attribute rhs) |
Related Functions | |
(Note that these are not member functions.) | |
template<class Socket > | |
bool | operator== (const RWTSocketAttribute< Socket > &x, const RWTSocketAttribute< Socket > &y) |
RWTSocketAttribute encapsulates conditions that may be true for a socket. An RWTSocketAttribute serves two purposes: it is used to represent a set of attributes on a socket, and it is used to indicate that a particular attribute is true
. It consists of two parts: the socket and the attribute.
enum RWTSocketAttribute::Attribute |
The Attribute type indicates the condition(s) on the socket. Attributes are used to indicate conditions of interest and to indicate what has happened on the socket. Attributes can be aggregated by ORing
them together. For example, the attribute sock_attr_canread|sock_attr_canwrite on a socket indicates that the socket can either read or write.
The later enum values (NIL
, CANREAD
, CANWRITE
, RWEXCEPTION
, ISEXCEPTION
, EXCEPTION
, ISCONNECTED
, CANACCEPT
, ANY
) have been retained, but are deprecated. You can refuse support for these values by defining the macro RW_DISABLE_DEPRECATED
.
Enumerator | |
---|---|
NIL |
No attributes. |
CANREAD |
Data is available for reading. |
CANWRITE |
Data is available for writing. |
RWEXCEPTION |
An exception, such as an error or out-of-band data. |
ISEXCEPTION |
An exception, such as an error or out-of-band data. |
EXCEPTION |
An exception, such as an error or out-of-band data. |
ISCONNECTED |
Connect has completed. |
CANACCEPT |
A new connection is ready to be accepted. |
ANY |
Any Attribute |
sock_attr_nil |
No attributes. |
sock_attr_canread |
Data is available for reading. |
sock_attr_canwrite |
Data is available for writing. |
sock_attr_exception |
An exception, such as an error or out-of-band data. |
sock_attr_isconnected |
Connect has completed. |
sock_attr_canaccept |
A new connection is ready to be accepted. |
sock_attr_any |
Any Attribute |
|
inline |
Constructs a null attribute on the undefined socket.
|
inline |
Constructs an attribute for a particular socket.
|
inline |
Copy constructor.
|
inline |
Destructor.
|
inline |
The attribute with which this
is associated. The attribute may be a set of several Attribute values ORed
together.
|
inline |
The socket with which the attribute is associated.
|
inline |
Assignment operator.
Combines the attribute lhs with rhs using a bitwise or operation, and returns the result.
Combines the attribute lhs with rhs using a bitwise and operation, stores the result into lhs, and returns the result.
|
related |
Returns true
if x and y refer to the same attribute(s) on the same socket. Requires that Socket
provide an equality operator.
Combines the attribute lhs with rhs using a bitwise exclusive or operation, and returns the result.
Combines the attribute lhs with rhs using a bitwise exclusive or operation, stores the result into lhs, and returns the result.
Combines the attribute lhs with rhs using a bitwise or operation, and returns the result.
Combines the attribute lhs with rhs using a bitwise or operation, stores the result into lhs, and returns the result.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |