BALL
1.4.2
|
#include <BALL/SYSTEM/networking.h>
Public Member Functions | |
TCPServer (Size port, bool restart=true) | |
virtual | ~TCPServer () |
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_ |
This class provides a base for very simple TCP-based servers.
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".
Definition at line 64 of file networking.h.
Definition at line 67 of file networking.h.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented in BALL::TCPServerThread.
Size BALL::TCPServer::getPort | ( | ) | const |
|
virtual |
Reimplemented in BALL::VIEW::ServerWidget::BALLViewServer.
void BALL::TCPServer::setPort | ( | Size | port | ) |
|
virtual |
|
protected |
Definition at line 95 of file networking.h.
|
protected |
Definition at line 91 of file networking.h.
|
protected |
Definition at line 93 of file networking.h.
|
protected |
Definition at line 88 of file networking.h.
|
protected |
Definition at line 89 of file networking.h.