Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

ServerSocketDescriptor Class Reference

Subclass of SocketDescriptor to provide TCP server-socket functionality. More...

#include <SocketDescriptor.h>

Inheritance diagram for ServerSocketDescriptor:

Inheritance graph
[legend]
Collaboration diagram for ServerSocketDescriptor:

Collaboration graph
[legend]
List of all members.

Public Methods

 ServerSocketDescriptor (ref< FileDescriptorManager > const &_fdMgr, int _port=0, string const &_hostname="")
ref<SocketDescriptoraccept ()
string const& getCanonicalAddress () const

Private Attributes

string canonicalAddress

Detailed Description

Subclass of SocketDescriptor to provide TCP server-socket functionality.

Definition at line 81 of file SocketDescriptor.h.


Constructor & Destructor Documentation

ServerSocketDescriptor::ServerSocketDescriptor ( ref< FileDescriptorManager > const & _fdMgr,
int _port = 0,
string const & _hostname = "" )
 

Construct a TCP server-socket listening on the given port, unless 0 is specified, in which case an unused port is used, on the given interface-name, unless the empty-string is specified, in which case INADDR_ANY is used (ie.

bind() to all interfaces if no preference is supplied).


Member Function Documentation

ref< SocketDescriptor > ServerSocketDescriptor::accept ( )
 

Calls accept() and returns a SocketDescriptor for the resulting new connection.

Throws FileDescriptor::Exception on failure.

Referenced by AcceptCallback::acceptHandler().

string const & ServerSocketDescriptor::getCanonicalAddress ( ) const [inline]
 

Retrieves the IP address and port number that this server socket is bound to.

Definition at line 101 of file SocketDescriptor.h.


Member Data Documentation

string ServerSocketDescriptor::canonicalAddress [private]
 

Definition at line 83 of file SocketDescriptor.h.


The documentation for this class was generated from the following file:
Generated at Wed Aug 15 01:05:31 2001 for mps-cpp by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001