Kea 2.7.5
|
Implementation of the UnixCommandMgr
.
More...
Public Member Functions | |
UnixCommandMgrImpl () | |
Constructor. | |
void | closeCommandSocket () |
Shuts down any open unix control sockets. | |
void | doAccept () |
Asynchronously accepts next connection. | |
std::string | getLockName () |
Returns the lock file name. | |
void | openCommandSocket (const isc::data::ConstElementPtr &socket_info) |
Opens acceptor service allowing the control clients to connect. | |
Public Attributes | |
boost::shared_ptr< UnixDomainSocketAcceptor > | acceptor_ |
Pointer to the acceptor service. | |
ConnectionPool | connection_pool_ |
Pool of connections. | |
IOServicePtr | io_service_ |
Pointer to the IO service used by the server process for running asynchronous tasks. | |
int | lock_fd_ |
File description to lock name file. | |
boost::shared_ptr< UnixDomainSocket > | socket_ |
Pointer to the socket into which the new connection is accepted. | |
std::string | socket_name_ |
Path to the unix domain socket descriptor. | |
long | timeout_ |
Connection timeout. | |
bool | use_external_ |
Use external sockets flag. | |
Implementation of the UnixCommandMgr
.
Definition at line 486 of file unix_command_mgr.cc.
|
inline |
Constructor.
Definition at line 490 of file unix_command_mgr.cc.
void isc::config::UnixCommandMgrImpl::closeCommandSocket | ( | ) |
Shuts down any open unix control sockets.
Definition at line 621 of file unix_command_mgr.cc.
References acceptor_, connection_pool_, getLockName(), isc::dhcp::IfaceMgr::instance(), lock_fd_, socket_name_, and use_external_.
void isc::config::UnixCommandMgrImpl::doAccept | ( | ) |
Asynchronously accepts next connection.
Definition at line 644 of file unix_command_mgr.cc.
References acceptor_, isc::config::command_logger, isc::config::COMMAND_SOCKET_ACCEPT_FAIL, connection_pool_, doAccept(), io_service_, LOG_ERROR, socket_, timeout_, and use_external_.
Referenced by doAccept(), and openCommandSocket().
|
inline |
Returns the lock file name.
Definition at line 510 of file unix_command_mgr.cc.
References socket_name_.
Referenced by closeCommandSocket(), and openCommandSocket().
void isc::config::UnixCommandMgrImpl::openCommandSocket | ( | const isc::data::ConstElementPtr & | socket_info | ) |
Opens acceptor service allowing the control clients to connect.
socket_info | Configuration information for the control socket. |
BadSocketInfo | When socket configuration is invalid. |
SocketError | When socket operation fails. |
Definition at line 543 of file unix_command_mgr.cc.
References acceptor_, isc::config::COMMAND_ACCEPTOR_START, isc::config::command_logger, doAccept(), getLockName(), isc::dhcp::IfaceMgr::instance(), io_service_, isc_throw, lock_fd_, LOG_INFO, socket_name_, isc::data::Element::string, use_external_, and isc::Exception::what().
boost::shared_ptr<UnixDomainSocketAcceptor> isc::config::UnixCommandMgrImpl::acceptor_ |
Pointer to the acceptor service.
Definition at line 519 of file unix_command_mgr.cc.
Referenced by closeCommandSocket(), doAccept(), and openCommandSocket().
ConnectionPool isc::config::UnixCommandMgrImpl::connection_pool_ |
Pool of connections.
Definition at line 530 of file unix_command_mgr.cc.
Referenced by closeCommandSocket(), and doAccept().
IOServicePtr isc::config::UnixCommandMgrImpl::io_service_ |
Pointer to the IO service used by the server process for running asynchronous tasks.
Definition at line 516 of file unix_command_mgr.cc.
Referenced by doAccept(), and openCommandSocket().
int isc::config::UnixCommandMgrImpl::lock_fd_ |
File description to lock name file.
Definition at line 539 of file unix_command_mgr.cc.
Referenced by closeCommandSocket(), and openCommandSocket().
boost::shared_ptr<UnixDomainSocket> isc::config::UnixCommandMgrImpl::socket_ |
Pointer to the socket into which the new connection is accepted.
Definition at line 522 of file unix_command_mgr.cc.
Referenced by doAccept().
std::string isc::config::UnixCommandMgrImpl::socket_name_ |
Path to the unix domain socket descriptor.
This is used to remove the socket file once the connection terminates.
Definition at line 527 of file unix_command_mgr.cc.
Referenced by closeCommandSocket(), getLockName(), and openCommandSocket().
long isc::config::UnixCommandMgrImpl::timeout_ |
bool isc::config::UnixCommandMgrImpl::use_external_ |
Use external sockets flag.
Definition at line 536 of file unix_command_mgr.cc.
Referenced by closeCommandSocket(), doAccept(), and openCommandSocket().