Kea 2.5.8
isc::config::CommandMgrImpl Class Reference

Implementation of the CommandMgr. More...

Public Member Functions

 CommandMgrImpl ()
 Constructor.
 
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< UnixDomainSocketAcceptoracceptor_
 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.
 
boost::shared_ptr< UnixDomainSocketsocket_
 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.
 

Detailed Description

Implementation of the CommandMgr.

Definition at line 471 of file command_mgr.cc.

Constructor & Destructor Documentation

◆ CommandMgrImpl()

isc::config::CommandMgrImpl::CommandMgrImpl ( )
inline

Constructor.

Definition at line 475 of file command_mgr.cc.

Member Function Documentation

◆ doAccept()

void isc::config::CommandMgrImpl::doAccept ( )

Asynchronously accepts next connection.

Definition at line 592 of file command_mgr.cc.

References acceptor_, isc::config::command_logger, isc::config::COMMAND_SOCKET_ACCEPT_FAIL, connection_pool_, doAccept(), io_service_, LOG_ERROR, socket_, and timeout_.

Referenced by doAccept(), and openCommandSocket().

+ Here is the call graph for this function:

◆ getLockName()

std::string isc::config::CommandMgrImpl::getLockName ( )
inline

Returns the lock file name.

Definition at line 491 of file command_mgr.cc.

References socket_name_.

Referenced by openCommandSocket().

◆ openCommandSocket()

void isc::config::CommandMgrImpl::openCommandSocket ( const isc::data::ConstElementPtr socket_info)

Opens acceptor service allowing the control clients to connect.

Parameters
socket_infoConfiguration information for the control socket.
Exceptions
BadSocketInfoWhen socket configuration is invalid.
SocketErrorWhen socket operation fails.

Definition at line 518 of file command_mgr.cc.

References acceptor_, isc::dhcp::IfaceMgr::addExternalSocket(), isc::config::COMMAND_ACCEPTOR_START, isc::config::command_logger, doAccept(), getLockName(), isc::dhcp::IfaceMgr::instance(), io_service_, isc_throw, LOG_INFO, socket_name_, isc::data::Element::string, and isc::Exception::what().

+ Here is the call graph for this function:

Member Data Documentation

◆ acceptor_

boost::shared_ptr<UnixDomainSocketAcceptor> isc::config::CommandMgrImpl::acceptor_

Pointer to the acceptor service.

Definition at line 500 of file command_mgr.cc.

Referenced by doAccept(), and openCommandSocket().

◆ connection_pool_

ConnectionPool isc::config::CommandMgrImpl::connection_pool_

Pool of connections.

Definition at line 511 of file command_mgr.cc.

Referenced by doAccept().

◆ io_service_

IOServicePtr isc::config::CommandMgrImpl::io_service_

Pointer to the IO service used by the server process for running asynchronous tasks.

Definition at line 497 of file command_mgr.cc.

Referenced by doAccept(), and openCommandSocket().

◆ socket_

boost::shared_ptr<UnixDomainSocket> isc::config::CommandMgrImpl::socket_

Pointer to the socket into which the new connection is accepted.

Definition at line 503 of file command_mgr.cc.

Referenced by doAccept().

◆ socket_name_

std::string isc::config::CommandMgrImpl::socket_name_

Path to the unix domain socket descriptor.

This is used to remove the socket file once the connection terminates.

Definition at line 508 of file command_mgr.cc.

Referenced by getLockName(), and openCommandSocket().

◆ timeout_

long isc::config::CommandMgrImpl::timeout_

Connection timeout.

Definition at line 514 of file command_mgr.cc.

Referenced by doAccept().


The documentation for this class was generated from the following file: