RWPortal RWSocketPortal RWSocket
Networking Tools: Network Communication Classes (net library)
#include <rw/toolpro/sockport.h> RWPortal portal = RWSocketPortal(RWInetAddr(42, "life.roguewave.com"));
net, tls (and possibly std)
RWSocketPortal inherits from RWPortal and references RWSocket.
This class provides a socket implementation of a portal, implemented using the RWSocket class. There is no state added to RWPortal. This implies you can assign an RWSocketPortal to an RWPortal with no loss of data (except for the type).
The socket representing RWSocketPortal's 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();
Creates a socket portal. You need to establish a connection using connect(), or the assignment operator, before the portal can be used.
RWSocketPortal(const RWSockAddrBase&);
Creates a socket portal connected to the address provided.
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 no more portals are using it.
RWSocketPortal(const RWSocketPortal& x);
Creates a copy of x.
void connect(const RWSockAddrBase)
Connects this portal to the address provided.
RWSocket socket() const;
Obtains a reference to the underlying socket.
RWSocketPortal& operator=(const RWSocketPortal& x);
Makes self a copy of x. The previous contents of self are lost.
enum WhoShouldClose { Portal, Application };
Indicates who is responsible for closing the socket.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.