59 boost::system::error_code received_ec;
64 [&io_service, &received_ec, &received_feed]
71 io_service->stopWork();
81 << received_ec.message());
90 return (received_feed->toElement());
91 }
catch (exception
const& ex) {
Exception thrown when the error during communication.
data::ConstElementPtr configGet(const std::string &service) override final
Get configuration.
data::ConstElementPtr configSet(data::ElementPtr config, const std::string &service) override final
Set configuration.
std::shared_ptr< UnixControlSocket > UnixControlSocketPtr
Type definition for the pointer to the UnixControlSocket.
data::ConstElementPtr configTest(data::ElementPtr config, const std::string &service) override final
Test configuration.
Base class for control socket communication.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
boost::shared_ptr< Element > ElementPtr
const std::string getName() const
Returns the Unix socket name.
Represents client side connection over the unix domain socket.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
The IOService class is a wrapper for the ASIO io_service class.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
ConstElementPtr createCommand(const std::string &command)
Creates a standard command message with no argument (of the form { "command": "my_command" }) ...
boost::shared_ptr< const Element > ConstElementPtr
constexpr long TIMEOUT_AGENT_FORWARD_COMMAND
Timeout for the Control Agent to forward command to a Kea server, e.g.
Class for control socket communication over UNIX socket.
std::shared_ptr< CfgControlSocket > CfgControlSocketPtr
Defines a pointer for CfgControlSocket instances.
Defines the logger used by the top-level component of kea-lfc.
boost::shared_ptr< const JSONFeed > ConstJSONFeedPtr
Pointer to the const JSONFeed.
This file contains several functions and constants that are used for handling commands and responses ...
Encapsulates socket path.
Encapsulates timeout value.
void start(const SocketPath &socket_path, const ControlCommand &command, Handler handler, const Timeout &timeout=Timeout(5000))
Starts asynchronous transaction with a remote endpoint.
std::shared_ptr< ControlSocketBase > ControlSocketBasePtr
Type definition for the pointer to the ControlSocketBase.
Encapsulates control command.
Contains declarations for UNIX control socket communication.