![]() |
Kea 3.0.0
|
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. | |
| Public Types inherited from isc::asiolink::IOSocket | |
| typedef boost::asio::socket_base::reuse_address | ReuseAddress |
| Represents SO_REUSEADDR socket option. | |
Public Member Functions | |
| UnixDomainSocketAcceptor (const IOServicePtr &io_service) | |
| Constructor. | |
| void | asyncAccept (const UnixDomainSocket &socket, const AcceptHandler &callback) |
| Asynchronously accept new connection. | |
| virtual int | getProtocol () const final |
| Returns the transport protocol of the socket. | |
| Public Member Functions inherited from isc::asiolink::IOAcceptor< boost::asio::local::stream_protocol, std::function< void(const boost::system::error_code &)> > | |
| IOAcceptor (const IOServicePtr &io_service) | |
| Constructor. | |
| virtual | ~IOAcceptor () |
| Destructor. | |
| void | bind (const EndpointType &endpoint) |
| Binds socket to an endpoint. | |
| void | close () const |
| Closes the acceptor. | |
| virtual int | getNative () const |
| Returns file descriptor of the underlying socket. | |
| bool | isOpen () const |
| Checks if the acceptor is open. | |
| void | listen () |
| Starts listening new connections. | |
| void | open (const EndpointType &endpoint) |
| Opens acceptor socket given the endpoint. | |
| void | setOption (const SettableSocketOption &socket_option) |
| Sets socket option. | |
| virtual | ~IOSocket () |
| The destructor. | |
Additional Inherited Members | |
| static IOSocket & | getDummyUDPSocket () |
| Return a non-usable "dummy" UDP socket for testing. | |
| static IOSocket & | getDummyTCPSocket () |
| Return a non-usable "dummy" TCP socket for testing. | |
| 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. | |
| IOSocket () | |
| The default constructor. | |
| 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. | |
| IOServicePtr | io_service_ |
| The IO service used to handle events. | |
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.