Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWSocketAttribute



Module

Networking Tools: Network Communication Classes (net library)

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Data Types

Member Functions

Synopsis

#include <rw/toolpro/sockatt.h>
RWSocketAttribute(socket, RWSocketAttribute::CANREAD)

Required Libraries

net, tls (and possibly std)

Description

The RWSocketAttribute class encapsulates conditions that may be true for a socket. An RWSocketAttribute serves two purposes: it is used to represent a set of attributes on a socket in which you may be interested, and it is used to indicate that a particular attribute is true. It consists of two parts: the socket and the attribute.

The RWSocketAttribute class is used by the global function select() (described in RWSocket) to do asynchronous I/O.

Public Constructors

RWSocketAttribute();
RWSocketAttribute(const RWSocket& socket, 
                 Attribute attribute=NIL);

Copy Constructors

RWSocketAttribute(const RWSocketAttribute& x);

Public Enums

enum Attribute {
  sock_attr_nil         = 0,  // placebo
  sock_attr_canread     = 1,  // Data available for reading
  sock_attr_canwrite    = 2,  // Data available for writing
  sock_attr_exception   = 4,  // An exception, such as an
                              // error or of band data
  sock_attr_isconnected = 8,  // Connect has completed
  sock_attr_canaccept   = 32, // A new connection is ready 
                              // to be accepted
  sock_attr_any         = ~0  // Interested in any Attribute
};

Assignment Operators

RWSocketAttribute& 
operator=(const RWSocketAttribute& x);

Public Member Functions

Attribute 
attribute() const;
RWSocket 
socket() const;

Global Functions

RWTValOrderedVector
RWTValOrderedVector<RWSocketAttribute>
rwSocketSelect(const RWTValOrderedVector<RWSocketAttribute>&
       attributes);
RWTValOrderedVector<RWSocketAttribute>
rwSocketSelect(const RWTValOrderedVector<RWSocketAttribute>&
       attributes, double timeout);

Global Operators

RWBoolean 
operator==(const RWSocketAttribute& x, 
           const RWSocketAttribute& y);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.