26 #ifndef NFD_DAEMON_FACE_TCP_CHANNEL_HPP 27 #define NFD_DAEMON_FACE_TCP_CHANNEL_HPP 35 typedef boost::asio::ip::tcp::endpoint
Endpoint;
62 return m_acceptor.is_open();
68 return m_channelFaces.size();
83 int backlog = boost::asio::ip::tcp::acceptor::max_connections);
90 ndn::nfd::FacePersistency persistency,
92 bool wantLpReliability,
95 time::nanoseconds timeout = time::seconds(4));
100 ndn::nfd::FacePersistency persistency;
101 bool wantLocalFields;
102 bool wantLpReliability;
107 createFace(boost::asio::ip::tcp::socket&& socket,
108 ndn::nfd::FacePersistency persistency,
109 bool wantLocalFields,
110 bool wantLpReliability,
118 handleAccept(
const boost::system::error_code& error,
123 handleConnect(
const boost::system::error_code& error,
125 const shared_ptr<boost::asio::ip::tcp::socket>& socket,
126 ConnectParams params,
127 const scheduler::EventId& connectTimeoutEvent,
133 const shared_ptr<boost::asio::ip::tcp::socket>& socket,
138 boost::asio::ip::tcp::acceptor m_acceptor;
139 boost::asio::ip::tcp::socket m_socket;
140 std::map<tcp::Endpoint, shared_ptr<Face>> m_channelFaces;
146 #endif // NFD_DAEMON_FACE_TCP_CHANNEL_HPP Class implementing TCP-based channel to create faces.
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.
function< void(uint32_t status, const std::string &reason)> FaceCreationFailedCallback
Prototype for the callback that is invoked when a face fails to be created.
represent a channel that communicates on a local endpoint
function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
Prototype for the callback that is invoked when a face is created (in response to an incoming connect...