Kea
1.9.9-git
|
Implements acceptor service for UnixDomainSocket. More...
#include <unix_domain_socket_acceptor.h>
Public Types | |
typedef std::function< void(const boost::system::error_code &)> | AcceptHandler |
Callback type used in call to UnixDomainSocketAcceptor::asyncAccept. More... | |
Public Types inherited from isc::asiolink::IOSocket | |
typedef boost::asio::socket_base::reuse_address | ReuseAddress |
Represents SO_REUSEADDR socket option. More... | |
Public Member Functions | |
UnixDomainSocketAcceptor (IOService &io_service) | |
Constructor. More... | |
void | asyncAccept (const UnixDomainSocket &socket, const AcceptHandler &callback) |
Asynchronously accept new connection. More... | |
virtual int | getProtocol () const final |
Returns the transport protocol of the socket. More... | |
Public Member Functions inherited from isc::asiolink::IOAcceptor< boost::asio::local::stream_protocol, std::function< void(const boost::system::error_code &)> > | |
IOAcceptor (IOService &io_service) | |
Constructor. More... | |
virtual | ~IOAcceptor () |
Destructor. More... | |
void | bind (const EndpointType &endpoint) |
Binds socket to an endpoint. More... | |
void | close () const |
Closes the acceptor. More... | |
virtual int | getNative () const |
Returns file descriptor of the underlying socket. More... | |
bool | isOpen () const |
Checks if the acceptor is open. More... | |
void | listen () |
Starts listening new connections. More... | |
void | open (const EndpointType &endpoint) |
Opens acceptor socket given the endpoint. More... | |
void | setOption (const SettableSocketOption &socket_option) |
Sets socket option. More... | |
Public Member Functions inherited from isc::asiolink::IOSocket | |
virtual | ~IOSocket () |
The destructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::asiolink::IOSocket | |
static IOSocket & | getDummyTCPSocket () |
Return a non-usable "dummy" TCP socket for testing. More... | |
static IOSocket & | getDummyUDPSocket () |
Return a non-usable "dummy" UDP socket for testing. More... | |
Protected Member Functions inherited from isc::asiolink::IOAcceptor< boost::asio::local::stream_protocol, std::function< void(const boost::system::error_code &)> > | |
void | asyncAcceptInternal (const SocketType &socket, const std::function< void(const boost::system::error_code &)> &callback) |
Asynchronously accept new connection. More... | |
Protected Member Functions inherited from isc::asiolink::IOSocket | |
IOSocket () | |
The default constructor. More... | |
Protected Attributes inherited from isc::asiolink::IOAcceptor< boost::asio::local::stream_protocol, std::function< void(const boost::system::error_code &)> > | |
boost::shared_ptr< typename boost::asio::local::stream_protocol::acceptor > | acceptor_ |
Underlying ASIO acceptor implementation. More... | |
Implements acceptor service for UnixDomainSocket.
This class is used to accept new incoming connections over unix domain sockets.
Definition at line 25 of file unix_domain_socket_acceptor.h.
typedef std::function<void(const boost::system::error_code&)> isc::asiolink::UnixDomainSocketAcceptor::AcceptHandler |
Callback type used in call to UnixDomainSocketAcceptor::asyncAccept.
Definition at line 30 of file unix_domain_socket_acceptor.h.
|
inlineexplicit |
Constructor.
io_service | Reference to the IO service. |
Definition at line 35 of file unix_domain_socket_acceptor.h.
|
inline |
Asynchronously accept new connection.
This method accepts new connection into the specified socket. When the new connection arrives or an error occurs the specified callback function is invoked.
socket | Socket into which connection should be accepted. |
callback | Callback function to be invoked when the new connection arrives. |
SocketType |
Definition at line 57 of file unix_domain_socket_acceptor.h.
|
inlinefinalvirtual |
Returns the transport protocol of the socket.
Implements isc::asiolink::IOSocket.
Definition at line 43 of file unix_domain_socket_acceptor.h.