Kea 2.7.0
isc::asiolink::UnixDomainSocketAcceptor Class Reference

Implements acceptor service for UnixDomainSocket. More...

#include <unix_domain_socket_acceptor.h>

+ Inheritance diagram for isc::asiolink::UnixDomainSocketAcceptor:

Public Types

typedef std::function< void(const boost::system::error_code &) AcceptHandler)
 Callback type used in call to UnixDomainSocketAcceptor::asyncAccept.

Public Member Functions

 UnixDomainSocketAcceptor (const IOServicePtr &io_service)
void asyncAccept (const UnixDomainSocket &socket, const AcceptHandler &callback)
 Asynchronously accept new connection.
virtual int getProtocol () const final
 Returns the transport protocol of the socket.

Additional Inherited Members

Detailed Description

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.

Member Typedef Documentation

◆ AcceptHandler

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.

Constructor & Destructor Documentation

◆ UnixDomainSocketAcceptor()

isc::asiolink::UnixDomainSocketAcceptor::UnixDomainSocketAcceptor ( const IOServicePtr & io_service)


io_serviceReference to the IO service.

Definition at line 35 of file unix_domain_socket_acceptor.h.

Member Function Documentation

◆ asyncAccept()

void isc::asiolink::UnixDomainSocketAcceptor::asyncAccept ( const UnixDomainSocket & socket,
const AcceptHandler & callback )

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.

socketSocket into which connection should be accepted.
callbackCallback function to be invoked when the new connection arrives.
Template Parameters

Definition at line 57 of file unix_domain_socket_acceptor.h.

References isc::asiolink::IOAcceptor< boost::asio::local::stream_protocol, std::function< void(const boost::system::error_code &)> >::asyncAcceptInternal().

+ Here is the call graph for this function:

◆ getProtocol()

virtual int isc::asiolink::UnixDomainSocketAcceptor::getProtocol ( ) const

Returns the transport protocol of the socket.


Implements isc::asiolink::IOSocket.

Definition at line 43 of file unix_domain_socket_acceptor.h.

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