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 (
const std::exception& ex) {
Exception thrown when the error during communication.
boost::shared_ptr< ControlSocketBase > ControlSocketBasePtr
Type definition for the pointer to the ControlSocketBase.
Base class for control socket communication.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
const std::string getName() const
Returns the Unix socket name.
Represents client side connection over the unix domain socket.
boost::shared_ptr< UnixControlSocket > UnixControlSocketPtr
Type definition for the pointer to the UnixControlSocket.
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.
virtual data::ConstElementPtr configTest(data::ConstElementPtr config, const std::string &service)
Test configuration.
#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" }) ...
virtual data::ConstElementPtr configSet(data::ConstElementPtr config, const std::string &service)
Set configuration.
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.
virtual data::ConstElementPtr configGet(const std::string &service)
Get configuration.
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.
boost::shared_ptr< CfgControlSocket > CfgControlSocketPtr
Defines a pointer for CfgControlSocket instances.
Encapsulates control command.
Contains declarations for UNIX control socket communication.