#include <networking.h>

Public Member Functions |
|
| TCPServer (Size port, bool restart=true) | |
| virtual void | activate () |
| virtual void | deactivate () |
| virtual void | startAccepting () |
| virtual void | handleConnection () |
| virtual void | connectionRequested () |
| void | setPort (Size port) |
| Size | getPort () const |
Protected Attributes |
|
| Size | port_ |
| bool | restart_ |
| TCPIOStream | connected_stream_ |
| BALL_ASIO_NAMESPACE::io_service | io_service_ |
| BALL_ASIO_NAMESPACE::ip::tcp::acceptor | acceptor_ |
By default, the server handles only one connection. The first request is accepted and converted into a TCPIOStream. If restart_ is set to true (default), the server listens again after the connection has been terminated.
Note that the server is not automatically started but rather waits for a call to "run".
1.5.8