26 #ifndef NFD_DAEMON_FACE_FACE_HPP
27 #define NFD_DAEMON_FACE_FACE_HPP
58 Face(unique_ptr<LinkService> service, unique_ptr<Transport> transport);
63 return m_service.get();
69 return m_transport.get();
157 ndn::nfd::FacePersistency
195 time::steady_clock::time_point
225 m_channel = std::move(channel);
230 unique_ptr<LinkService> m_service;
231 unique_ptr<Transport> m_transport;
233 weak_ptr<Channel> m_channel;
239 m_transport->close();
245 m_service->sendInterest(interest);
251 m_service->sendData(data);
257 m_service->sendNack(nack);
263 return m_transport->getLocalUri();
269 return m_transport->getRemoteUri();
272 inline ndn::nfd::FaceScope
275 return m_transport->getScope();
278 inline ndn::nfd::FacePersistency
281 return m_transport->getPersistency();
287 return m_transport->setPersistency(persistency);
290 inline ndn::nfd::LinkType
293 return m_transport->getLinkType();
299 return m_service->getEffectiveMtu();
305 return m_transport->getState();
308 inline time::steady_clock::time_point
311 return m_transport->getExpirationTime();
Gives access to counters provided by Face.
Generalization of a network interface.
time::steady_clock::time_point getExpirationTime() const
Returns the expiration time of the face.
signal::Signal< Transport, FaceState, FaceState > & afterStateChange
Signals after face state changed.
Face(unique_ptr< LinkService > service, unique_ptr< Transport > transport)
ndn::nfd::FaceScope getScope() const
Returns whether the face is local or non-local for scope control purposes.
FaceUri getRemoteUri() const
Returns a FaceUri representing the remote endpoint.
signal::Signal< LinkService, Data, EndpointId > & afterReceiveData
Signals on Data received.
FaceCounters & getCounters() noexcept
void setPersistency(ndn::nfd::FacePersistency persistency)
Changes the face persistency setting.
signal::Signal< LinkService, Interest > & onDroppedInterest
Signals on Interest dropped by reliability system for exceeding allowed number of retx.
void sendInterest(const Interest &interest)
Send Interest.
signal::Signal< LinkService, lp::Nack, EndpointId > & afterReceiveNack
Signals on Nack received.
ndn::nfd::FacePersistency getPersistency() const
Returns the current persistency setting of the face.
weak_ptr< Channel > getChannel() const
Get channel on which face was created (unicast) or the associated channel (multicast).
void setId(FaceId id) noexcept
Sets the face ID.
void setChannel(weak_ptr< Channel > channel)
Set channel on which face was created (unicast) or the associated channel (multicast).
ssize_t getMtu() const
Returns the effective MTU of the face.
LinkService * getLinkService() const noexcept
FaceId getId() const noexcept
Returns the face ID.
void sendNack(const lp::Nack &nack)
Send Nack.
signal::Signal< LinkService, Interest, EndpointId > & afterReceiveInterest
Signals on Interest received.
void close()
Request that the face be closed.
FaceUri getLocalUri() const
Returns a FaceUri representing the local endpoint.
FaceState getState() const
Returns the face state.
const FaceCounters & getCounters() const noexcept
void sendData(const Data &data)
Send Data.
ndn::nfd::LinkType getLinkType() const
Returns the link type of the face (point-to-point, multi-access, ...).
Transport * getTransport() const noexcept
For internal use by FaceLogging macros.
The upper half of a Face.
The lower half of a Face.
#define NFD_FINAL_UNLESS_WITH_TESTS
std::ostream & operator<<(std::ostream &os, const FaceLogHelper< Face > &flh)
TransportState
Indicates the state of a transport.
constexpr FaceId INVALID_FACEID
Indicates an invalid FaceId.
uint64_t FaceId
Identifies a face.