![]() |
Elm
2
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 |
| virtual Connection * | listen (void)=0 |
| 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 |
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 Server::manage().
|
static |
Build a server working on the given port.
| port | Port of the server. |
References ServerSocket::port().
|
static |
Build a server without specifying a precise port.
Referenced by Server::open().
Open the port.
| Exception | Thrown if there is an error during the open. |
Referenced by Server::open().
|
pure virtual |
Get the current port. This information is only meaningful once the server socket is opened.
Referenced by ServerSocket::make(), and Server::port().