Module: Secure Communication Module Package: Secure Sockets
RWSecureSocketListenerRWSocketPortalBase
#include <rw/secsock/RWSecureSocketListener.h>
RWSecureSocketListener creates a secure socket listener, which waits on a user-defined socket address for incoming connections. Connections are obtained as RWSecureSocketPortal instances.
enum WhoShouldClose { Portal, Application };
Indicates who is responsible for closing the listening socket.
RWSecureSocketListener();
Creates an uninitialized secure socket listener. Self cannot be used until is initialized using listen().
RWSecureSocketListener(const RWSockAddrBase& addr, const RWSecureSocketContext& context, int backlog=5);
Sets up a listener on addr using context, and sets up a queue to wait for connections.
RWSecureSocketListener(const RWSecureSocket& socket, WhoShouldClose who=Portal);
Creates a listening portal to the communications channel, where socket is the socket doing the listening. This constructor is the only way to create a socket listener whose underlying socket is not closed when portals are not using it.
~RWSecureSocketListener();
Closes the socket if self is the last referencing portal and WhoShouldClose is not Application.
RWSecureSocketPortal operator()(RWSockAddr& addr) const;
Blocks until the next connection arrives, then returns a portal to it.
RWSecureSocket getSocket() const;
Returns a copy of the RWSecureSocket underlying this RWSecureSocketListener.
void listen(const RWSockAddrBase& addr, const RWSecureSocketContext& context);
Binds the listener to addr using context, and sets up a queue to wait for connections.
© 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.