Networking Tools: Network Communication Classes (net library)
#include <rw/toolpro/sockport.h> RWSocketListener listener(RWInetAddr(71));
net, tls (and possibly std)
A socket listener waits on a specified socket address for incoming connections. Connections are obtained as RWSocketPortals.
enum WhoShouldClose { Portal, Application };
Indicates who is responsible for closing the socket.
RWSocketListener();
Creates an uninitialized socket listener. Self needs to be initialized using listen() before it can be used.
RWSocketListener(const RWSockAddrBase&);
Sets up a listener on the address indicated, and sets up a queue to wait for connections.
RWSocketListener(const RWSocket& socket, WhoShouldClose who=Portal);
Creates a listening portal to the communications channel, where socket is the socket doing the listening. Using this constructor is the only way to create a socket that is not closed automatically when no more portals are using it.
void listen(const RWSockAddrBase);
Binds the listener to the address indicated, and sets up a queue to wait for connections.
RWSocketPortal operator()() const;
Receives the next waiting connection.
RWSocket socket() const;
Obtains a reference to the underlying socket.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.