26 #ifndef NFD_DAEMON_FACE_TCP_CHANNEL_HPP 27 #define NFD_DAEMON_FACE_TCP_CHANNEL_HPP 34 typedef boost::asio::ip::tcp::endpoint
Endpoint;
40 const boost::asio::ip::address& remote)>;
64 return m_acceptor.is_open();
70 return m_channelFaces.size();
85 int backlog = boost::asio::ip::tcp::acceptor::max_connections);
95 time::nanoseconds timeout = 8_s);
99 createFace(boost::asio::ip::tcp::socket&& socket,
108 handleAccept(
const boost::system::error_code& error,
113 handleConnect(
const boost::system::error_code& error,
115 const shared_ptr<boost::asio::ip::tcp::socket>& socket,
117 const scheduler::EventId& connectTimeoutEvent,
123 const shared_ptr<boost::asio::ip::tcp::socket>& socket,
128 boost::asio::ip::tcp::acceptor m_acceptor;
129 boost::asio::ip::tcp::socket m_socket;
130 std::map<tcp::Endpoint, shared_ptr<Face>> m_channelFaces;
131 bool m_wantCongestionMarking;
138 #endif // NFD_DAEMON_FACE_TCP_CHANNEL_HPP Class implementing TCP-based channel to create faces.
std::function< ndn::nfd::FaceScope(const boost::asio::ip::address &local, const boost::asio::ip::address &remote)> DetermineFaceScopeFromAddress
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.
Parameters used to set Transport properties or LinkService options on a newly created face...
bool isListening() const override
Returns whether the channel is listening.
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
boost::asio::ip::tcp::endpoint Endpoint
size_t size() const override
Returns the number of faces in the channel.
Represents a channel that listens on a local endpoint.
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...