Interactive console server. More...
#include <senf/Utils/Console/Server.hh>

Public Types | |
| enum | Mode { Automatic, Interactive, Noninteractive } |
| typedef detail::ServerHandle | ServerHandle |
Public Types inherited from senf::intrusive_refcount_base | |
| typedef unsigned | refcount_t |
Public Member Functions | |
| std::string const & | name () const |
| Get server name. More... | |
| Server & | name (std::string const &name) |
| Set server name. More... | |
| Server & | welcomeMessage (std::string const &message) |
| Set server welcome message. More... | |
| DirectoryNode & | root () const |
| Get root node. More... | |
| Server & | root (DirectoryNode &root) |
| Set root node. More... | |
| Mode | mode () const |
| Get mode. More... | |
| Server & | mode (Mode mode) |
| Set mode. More... | |
| void | stop () |
| Stop the server. More... | |
Public Member Functions inherited from senf::intrusive_refcount_base | |
| virtual | ~intrusive_refcount_base () |
| refcount_t | refcount () const |
| bool | is_shared () const |
Static Public Member Functions | |
| static Server & | start (senf::INet4SocketAddress const &address) |
| Start server on given IPv4 address/port. More... | |
| static Server & | start (senf::INet6SocketAddress const &address) |
| Start server on given IPv6 address/port. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from senf::intrusive_refcount | |
| intrusive_refcount () | |
Protected Member Functions inherited from intrusive_refcount_t< intrusive_refcount > | |
| intrusive_refcount_t () | |
Protected Member Functions inherited from senf::intrusive_refcount_base | |
| intrusive_refcount_base () | |
| void | add_ref () |
| bool | release () |
Interactive console server.
This class provides an interactive console TCP server.
| typedef detail::ServerHandle senf::console::Server::ServerHandle |
| Mode senf::console::Server::mode | ( | ) | const |
Get mode.
Set mode.
There are two Server types:
The mode parameter selects between these modes. In Automatic (the default), a client connection is considered to be interactive if there is no data traffic in the first 500ms after the connection is opened.
| std::string const& senf::console::Server::name | ( | ) | const |
Get server name.
This information is used in the prompt string.
| Server& senf::console::Server::name | ( | std::string const & | name | ) |
Set server name.
This information is used in the prompt string.
| DirectoryNode& senf::console::Server::root | ( | ) | const |
Get root node.
| Server& senf::console::Server::root | ( | DirectoryNode & | root | ) |
Set root node.
node will be the root node for all clients launched from this server.
|
static |
|
static |
| void senf::console::Server::stop | ( | ) |
| senf::console::Server & Server::welcomeMessage | ( | std::string const & | message | ) |