Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
elm::net::ServerSocket Class Referenceabstract

#include <elm/net/ServerSocket.h>

Public Member Functions

virtual ~ServerSocket (void)
 
virtual int port (void) const =0
 
virtual void open (void)=0 throw (Exception)
 
virtual Connectionlisten (void)=0 throw (Exception)
 
virtual void close (void)=0
 

Static Public Member Functions

static ServerSocketmake (void)
 
static ServerSocketmake (int port)
 

Detailed Description

This class provides a way to listen on a port for connection. For each connection, a dedicated object is created and returned.

Constructor & Destructor Documentation

elm::net::ServerSocket::~ServerSocket ( void  )
virtual

Member Function Documentation

virtual void elm::net::ServerSocket::close ( void  )
pure virtual
void elm::net::ServerSocket::listen ( void  )
throw (Exception
)
pure virtual

void ServerSocket::close(void); Close the server socket.

Listen for a connection and return it.

Exceptions
ExceptionThrown if there is an error during the open.

Referenced by elm::net::Server::manage().

ServerSocket * elm::net::ServerSocket::make ( void  )
static

Build a server without specifiying a precise port.

Returns
Built server socket.

Referenced by elm::net::Server::open().

ServerSocket * elm::net::ServerSocket::make ( int  port)
static

Build a server working on the given port.

Parameters
portPort of the server.
Returns
Built server socket.
void elm::net::ServerSocket::open ( void  )
throw (Exception
)
pure virtual

Open the port.

Exceptions
ExceptionThrown if there is an error during the open.

Referenced by elm::net::Server::open().

int elm::net::ServerSocket::port ( void  ) const
pure virtual

Get the current port. This information is only meaningful once the server socket is opened.

Returns
Current socket server port.

Referenced by elm::net::Server::port().


The documentation for this class was generated from the following files: