rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWSocketPortal Class Reference
[Essential Networking Module]

Socket implementation of a portal. More...

#include <rw/network/RWSocketPortal.h>

Inheritance diagram for RWSocketPortal:
RWPortal RWSocketPortalBase

List of all members.

Public Member Functions

 RWSocketPortal ()
 RWSocketPortal (const RWSockAddrBase &)
 RWSocketPortal (const RWSocket &socket, WhoShouldClose=Portal)
void connect (const RWSockAddrBase &address)
RWSocket getSocket () const

Detailed Description

RWSocketPortal is a socket implementation of a portal, implemented using the RWSocket class. State is not added to RWPortal. This means that you can assign an RWSocketPortal to an RWPortal without loss of data, except for the type.

The RWSocket representing the RWSocketPortal communication channel is normally closed when the last portal into the channel is destroyed. It is possible to prevent this by using a special constructor.


Constructor & Destructor Documentation

RWSocketPortal::RWSocketPortal (  ) 

Creates a socket portal. You need to establish a connection using connect() or the assignment operator before the portal can be used.

RWSocketPortal::RWSocketPortal ( const RWSockAddrBase  ) 

Creates a socket portal connected to the address provided.

RWSocketPortal::RWSocketPortal ( const RWSocket socket,
WhoShouldClose  = Portal 
)

Creates a portal to the communications channel represented by socket. Using this constructor is the only way to create a socket that is not automatically closed when portals are no longer using it.


Member Function Documentation

void RWSocketPortal::connect ( const RWSockAddrBase address  ) 

Connects this portal to the address provided.

RWSocket RWSocketPortal::getSocket (  )  const

Returns a copy of the underlying RWSocket object.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

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