Elm
1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#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 Connection * | listen (void)=0 throw (Exception) |
virtual void | close (void)=0 |
Static Public Member Functions | |
static ServerSocket * | make (void) |
static ServerSocket * | make (int port) |
This class provides a way to listen on a port for connection. For each connection, a dedicated object is created and returned.
|
virtual |
|
pure virtual |
|
pure virtual |
void ServerSocket::close(void); Close the server socket.
Listen for a connection and return it.
Exception | Thrown if there is an error during the open. |
Referenced by elm::net::Server::manage().
|
static |
Build a server without specifiying a precise port.
Referenced by elm::net::Server::open().
|
static |
Build a server working on the given port.
port | Port of the server. |
|
pure virtual |
Open the port.
Exception | Thrown if there is an error during the open. |
Referenced by elm::net::Server::open().
|
pure virtual |
Get the current port. This information is only meaningful once the server socket is opened.
Referenced by elm::net::Server::port().