rwlogo
SourcePro 11.1

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWSecureSocketListener Class Reference
[Secure Sockets]

Creates a secure socket listener, which waits on a user-defined socket address for incoming connections. More...

#include <rw/secsock/RWSecureSocketListener.h>

Inheritance diagram for RWSecureSocketListener:
RWSocketPortalBase

List of all members.

Public Member Functions

 RWSecureSocketListener ()
 RWSecureSocketListener (const RWSockAddrBase &addr, const RWSecureSocketContext &context)
 RWSecureSocketListener (const RWSecureSocket &socket, WhoShouldClose who=Portal)
 ~RWSecureSocketListener ()
void listen (const RWSockAddrBase &addr, const RWSecureSocketContext &context)
RWSecureSocketPortal operator() () const
RWSecureSocket getSocket () const

Detailed Description

RWSecureSocketListener creates a secure socket listener, which waits on a user-defined socket address for incoming connections. Connections are obtained as RWSecureSocketPortal instances.


Constructor & Destructor Documentation

RWSecureSocketListener::RWSecureSocketListener (  ) 

Creates an uninitialized secure socket listener. Self cannot be used until is initialized using listen().

RWSecureSocketListener::RWSecureSocketListener ( const RWSockAddrBase addr,
const RWSecureSocketContext context 
)

Sets up a listener on addr using context, and sets up a queue to wait for connections.

RWSecureSocketListener::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::~RWSecureSocketListener (  ) 

Closes the socket if self is the last referencing portal and WhoShouldClose is not Application.


Member Function Documentation

RWSecureSocket RWSecureSocketListener::getSocket (  )  const

Returns a copy of the RWSecureSocket underlying this RWSecureSocketListener.

void RWSecureSocketListener::listen ( const RWSockAddrBase addr,
const RWSecureSocketContext context 
)

Binds the listener to addr using context, and sets up a queue to wait for connections.

RWSecureSocketPortal RWSecureSocketListener::operator() (  )  const

Blocks until the next connection arrives, then returns a portal to it.


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