SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Creates a secure socket listener, which waits on a user-defined socket address for incoming connections. More...
#include <rw/secsock/RWSecureSocketListener.h>
Public Member Functions | |
RWSecureSocketListener () | |
RWSecureSocketListener (const RWSockAddrBase &addr, const RWSecureSocketContext &context, int backlog=5) | |
RWSecureSocketListener (const RWSecureSocket &socket, WhoShouldClose who=Portal) | |
~RWSecureSocketListener () | |
void | listen (const RWSockAddrBase &addr, const RWSecureSocketContext &context, int backlog=5) |
RWSecureSocketPortal | accept (RWSockAddr *addr=0) const |
RWSecureSocketPortal | operator() (RWSockAddr *addr=0) const |
RWSecureSocket | getSocket () const |
RWSecureSocketListener creates a secure socket listener, which waits on a user-defined socket address for incoming connections. Connections are obtained as RWSecureSocketPortal instances.
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, | |||
int | backlog = 5 | |||
) |
Sets up a listener on addr using context, and sets up a queue to wait for connections. The backlog parameter specifies the number of incoming connection requests that the protocol software enqueues while a connection is being processed.
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.
RWSecureSocketPortal RWSecureSocketListener::accept | ( | RWSockAddr * | addr = 0 |
) | const |
Receives the next waiting connection. The address of the connecting client will be stored in the RWSockAddr referenced by addr.
RWSecureSocket RWSecureSocketListener::getSocket | ( | ) | const |
Returns a copy of the RWSecureSocket underlying this RWSecureSocketListener.
void RWSecureSocketListener::listen | ( | const RWSockAddrBase & | addr, | |
const RWSecureSocketContext & | context, | |||
int | backlog = 5 | |||
) |
Binds the listener to addr using context, and sets up a queue to wait for connections. The backlog parameter specifies the number of incoming connection requests that the protocol software enqueues while a connection is being processed.
RWSecureSocketPortal RWSecureSocketListener::operator() | ( | RWSockAddr * | addr = 0 |
) | const |
Receives the next waiting connection. The address of the connecting client will be stored in the RWSockAddr referenced by addr.
© 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.