26 #ifndef NFD_DAEMON_FACE_UNIX_STREAM_CHANNEL_HPP
27 #define NFD_DAEMON_FACE_UNIX_STREAM_CHANNEL_HPP
31 #include <boost/asio/local/stream_protocol.hpp>
34 using Endpoint = boost::asio::local::stream_protocol::endpoint;
88 int backlog = boost::asio::socket_base::max_listen_connections);
97 const bool m_wantCongestionMarking;
98 bool m_isListening =
false;
99 boost::asio::local::stream_protocol::acceptor m_acceptor;
Represents a channel that listens on a local endpoint.
Class implementing a local channel to create faces.
size_t size() const final
Returns the number of faces in the channel.
bool isListening() const final
Returns whether the channel is listening.
UnixStreamChannel(const unix_stream::Endpoint &endpoint, bool wantCongestionMarking)
Create a UnixStream channel for the specified endpoint.
~UnixStreamChannel() final
void listen(const FaceCreatedCallback &onFaceCreated, const FaceCreationFailedCallback &onAcceptFailed, int backlog=boost::asio::socket_base::max_listen_connections)
Start listening.
std::function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when a face fails to be created.
std::function< void(const shared_ptr< Face > &)> FaceCreatedCallback
Prototype for the callback that is invoked when a face is created (in response to an incoming connect...
boost::asio::local::stream_protocol::endpoint Endpoint