Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Networking Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

9.3 Socket Listeners

The RWSocketListener is an abstraction that takes care of many of the details of handling the server side socket. It acts at the Communication Services Layer and acts much like RWPortal. It can automatically close the socket on destruction and returns Portal to the connected client. Assuming that addr is RWSockAddr, or a derived address type, the following illustrates how you would accept a connection using RWSocketListener:

//1

Binds the listener to the address specified in addr and sets it up to start accepting connections.

//2

Accepta an incoming connection and returns it as an RWSocketPortal instance.

The RWSocketListener class provides a function call operator to accept incoming connections. The function call operator is a simply a convenience and is used elsewhere in the documentation.



Previous fileTop of DocumentContentsIndex pageNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.