SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Socket implementation of a portal. More...
#include <rw/network/RWSocketPortal.h>
Public Member Functions | |
RWSocketPortal () | |
RWSocketPortal (const RWSockAddrBase &) | |
RWSocketPortal (const RWSocket &socket, WhoShouldClose=Portal) | |
void | connect (const RWSockAddrBase &address) |
RWSocket | getSocket () const |
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.
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.
void RWSocketPortal::connect | ( | const RWSockAddrBase & | address | ) |
Connects this portal to the address provided.
© 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.