#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 BALL::TCPServer::~TCPServer | ( | ) | [virtual] |
| virtual void BALL::TCPServer::activate | ( | ) | [virtual] |
| virtual void BALL::TCPServer::connectionRequested | ( | ) | [virtual] |
| virtual void BALL::TCPServer::deactivate | ( | ) | [virtual] |
Reimplemented in BALL::TCPServerThread.
| Size BALL::TCPServer::getPort | ( | ) | const |
| virtual void BALL::TCPServer::handleConnection | ( | ) | [virtual] |
Reimplemented in BALL::VIEW::ServerWidget::BALLViewServer.
| void BALL::TCPServer::setPort | ( | Size | port | ) |
| virtual void BALL::TCPServer::startAccepting | ( | ) | [virtual] |
BALL_ASIO_NAMESPACE::ip::tcp::acceptor BALL::TCPServer::acceptor_ [protected] |
Definition at line 95 of file networking.h.
TCPIOStream BALL::TCPServer::connected_stream_ [protected] |
Definition at line 91 of file networking.h.
BALL_ASIO_NAMESPACE::io_service BALL::TCPServer::io_service_ [protected] |
Definition at line 93 of file networking.h.
Size BALL::TCPServer::port_ [protected] |
Reimplemented in BALL::VIEW::ServerWidget::BALLViewServer.
Definition at line 88 of file networking.h.
bool BALL::TCPServer::restart_ [protected] |
Definition at line 89 of file networking.h.
1.6.3