rwlogo
SourcePro 11.1

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWSecureSocketAttribute Class Reference
[Secure Sockets]

Encapsulates socket conditions. More...

#include <rw/secsock/RWSecureSocketAttribute.h>

List of all members.

Public Types

enum  Attribute {
  sock_attr_nil, sock_attr_canread, sock_attr_canwrite, sock_attr_exception,
  sock_attr_isconnected, sock_attr_canaccept, sock_attr_any
}

Public Member Functions

 RWSecureSocketAttribute (void)
 RWSecureSocketAttribute (const RWSecureSocket &socket, Attribute attribute=sock_attr_nil)
 RWSecureSocketAttribute (const RWSecureSocketAttribute &second)
 ~RWSecureSocketAttribute (void)
RWSecureSocketAttributeoperator= (const RWSecureSocketAttribute &second)
RWSecureSocket getSocket (void) const
Attribute getAttribute (void) const
bool operator< (const RWSecureSocketAttribute &s) const

Related Functions

(Note that these are not member functions.)



RWTValOrderedVector
< RWSecureSocketAttribute
rwSecureSocketSelect (const RWTValOrderedVector< RWSecureSocketAttribute > &attributes)
RWTValOrderedVector
< RWSecureSocketAttribute
rwSecureSocketSelect (const RWTValOrderedVector< RWSecureSocketAttribute > &, double timeout)
bool operator== (const RWSecureSocketAttribute &x, const RWSecureSocketAttribute &y)

Detailed Description

RWSecureSocketAttribute encapsulates socket conditions.


Member Enumeration Documentation

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.

Enumerator:
sock_attr_nil 

No attributes.

sock_attr_canread 

Data is available for reading.

sock_attr_canwrite 

Data is available for writing.

sock_attr_exception 

Deprecated; avoid.

sock_attr_isconnected 

Connect operation has completed.

sock_attr_canaccept 

A new connection is ready to be accepted.

sock_attr_any 

Any Attribute.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Friends And Related Function Documentation

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]

Waits for a socket attribute in the list to become true. Throws an RWSecureSocketInvalidSocketError exception when a secure socket in an attribute is invalid. This function operates on the TCP socket underlying the SSL/TLS connection. As a result, you may receive unexpected results. Please see Section 5.11.3, "Using rwSecureSocketSelect," in the Secure Communication Module User's Guide for more information.

Blocks for no more than timeout seconds.

RWTValOrderedVector< RWSecureSocketAttribute > rwSecureSocketSelect ( const RWTValOrderedVector< RWSecureSocketAttribute > &  attributes  )  [related]

Waits for a socket attribute in the list to become true. Throws an RWSecureSocketInvalidSocketError exception when a secure socket in an attribute is invalid. This function operates on the TCP socket underlying the SSL/TLS connection. As a result, you may receive unexpected results. Please see Section 5.11.3, "Using rwSecureSocketSelect," in the Secure Communication Module User's Guide for more information.

Can block indefinitely.


© 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.