62 boost::system::error_code received_ec;
67 [&io_service, &received_ec, &received_feed]
74 io_service->stopWork();
83 isc_throw(ControlSocketError,
"communication error: "
84 << received_ec.message());
89 isc_throw(ControlSocketError,
"empty response");
93 return (received_feed->toElement());
94 }
catch (
const std::exception& ex) {
95 isc_throw(ControlSocketError,
"unparsable response: " << ex.what());
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.
Represents client side connection over the unix domain socket.
boost::shared_ptr< UnixControlSocket > UnixControlSocketPtr
Type definition for the pointer to the UnixControlSocket.
virtual ~UnixControlSocket()
Destructor (does nothing).
const std::string getName() const
Returns the Unix socket name.
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-dhcp-ddns.
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.
boost::shared_ptr< CfgControlSocket > CfgControlSocketPtr
Defines a pointer for CfgControlSocket instances.
Encapsulates control command.
Contains declarations for UNIX control socket communication.