UDP Console server. More...
#include <senf/Utils/Console/UDPServer.hh>
Public Types | |
typedef senf::ClientSocketHandle< senf::MakeSocketPolicy< senf::UDPv4SocketProtocol::Policy, senf::BSDAddressingPolicy >::policy > | Handle |
Public Member Functions | |
UDPServer & | replies (bool enable) |
Enable or disable reply packets. More... | |
UDPServer & | replies (senf::INet4SocketAddress const &address) |
Send replies to address. More... | |
UDPServer & | replies (senf::INet6SocketAddress const &address) |
Send replies to address. More... | |
UDPServer & | emptyReplies (bool enable) |
Enable or disable empty reply packets. More... | |
DirectoryNode & | root () const |
Get root node. More... | |
UDPServer & | root (DirectoryNode &root) |
Set root node. More... | |
Structors and default members | |
UDPServer (senf::INet4SocketAddress const &address) | |
Open UDP server on address. More... | |
UDPServer (senf::INet6SocketAddress const &address) | |
Open UDP server on address. More... | |
UDP Console server.
This class provides UDP access to the console to allow remote scripting. The UDP console does support multicast operation.
Every UDP packet will be executed in a clean context: No directory groups are open/closed, and the current directory is always the root directory.
By default, the server will send command replies via UDP to the sender of the corresponding incoming command. Replies may however either be completely disabled or be sent to a fixed address (which may be a multicast address).
Definition at line 48 of file UDPServer.hh.
typedef senf::ClientSocketHandle< senf::MakeSocketPolicy<senf::UDPv4SocketProtocol::Policy, senf::BSDAddressingPolicy>::policy > senf::console::UDPServer::Handle |
Definition at line 59 of file UDPServer.hh.
|
explicit |
Open UDP server on address.
Definition at line 28 of file UDPServer.cc.
|
explicit |
Open UDP server on address.
Definition at line 42 of file UDPServer.cc.
senf::console::UDPServer & senf::console::UDPServer::emptyReplies | ( | bool | enable | ) |
senf::console::UDPServer & senf::console::UDPServer::replies | ( | bool | enable | ) |
Enable or disable reply packets.
Definition at line 55 of file UDPServer.cc.
senf::console::UDPServer & senf::console::UDPServer::replies | ( | senf::INet4SocketAddress const & | address | ) |
Send replies to address.
Default: enabledDefault: no address set (send replies to sender)
Definition at line 62 of file UDPServer.cc.
senf::console::UDPServer & senf::console::UDPServer::replies | ( | senf::INet6SocketAddress const & | address | ) |
Send replies to address.
Default: no address set (send replies to sender)
Definition at line 71 of file UDPServer.cc.
senf::console::DirectoryNode & senf::console::UDPServer::root | ( | ) | const |
Get root node.
Definition at line 85 of file UDPServer.cc.
senf::console::UDPServer & senf::console::UDPServer::root | ( | DirectoryNode & | root | ) |
Set root node.
node will be the root node for all clients launched from this server.
Definition at line 91 of file UDPServer.cc.