26 #ifndef NFD_DAEMON_FACE_FACE_HPP 27 #define NFD_DAEMON_FACE_FACE_HPP 71 :
public std::enable_shared_from_this<Face>, noncopyable
74 Face(unique_ptr<LinkService> service, unique_ptr<Transport> transport);
196 unique_ptr<LinkService> m_service;
197 unique_ptr<Transport> m_transport;
205 return m_service.get();
211 return m_transport.get();
217 m_service->sendInterest(interest);
223 m_service->sendData(data);
229 m_service->sendNack(nack);
259 return m_transport->getLocalUri();
265 return m_transport->getRemoteUri();
271 return m_transport->getScope();
277 return m_transport->getPersistency();
283 return m_transport->setPersistency(persistency);
289 return m_transport->getLinkType();
295 return m_transport->getState();
301 return m_transport->getExpirationTime();
307 m_transport->close();
326 #endif // NFD_DAEMON_FACE_FACE_HPP signal::Signal< LinkService, Interest > & onDroppedInterest
signals on Interest dropped by reliability system for exceeding allowed number of retx
generalization of a network interface
std::ostream & operator<<(std::ostream &os, const Face &face)
TransportState
indicates the state of a transport
FaceState getState() const
const FaceId FACEID_INTERNAL_FACE
identifies the InternalFace used in management
Represents an Interest packet.
Transport * getTransport() const
FaceUri getLocalUri() const
FaceUri getRemoteUri() const
LinkService * getLinkService() const
provides a lightweight signal / event system
void sendInterest(const Interest &interest)
sends Interest on Face
represents a Network Nack
void setPersistency(ndn::nfd::FacePersistency persistency)
changes face persistency setting
time::steady_clock::TimePoint getExpirationTime() const
void sendData(const Data &data)
sends Data on Face
uint64_t getMetric() const
ndn::nfd::LinkType getLinkType() const
Copyright (c) 2011-2015 Regents of the University of California.
TransportState FaceState
indicates the state of a face
void setMetric(uint64_t metric)
signal::Signal< LinkService, Data > & afterReceiveData
signals on Data received
const FaceId FACEID_RESERVED_MAX
upper bound of reserved FaceIds
ndn::nfd::FaceScope getScope() const
signal::Signal< Transport, FaceState, FaceState > & afterStateChange
signals after face state changed
signal::Signal< LinkService, Interest > & afterReceiveInterest
signals on Interest received
represents the underlying protocol and address used by a Face
Face(unique_ptr< LinkService > service, unique_ptr< Transport > transport)
void setId(FaceId id)
sets face ID
ndn::nfd::FacePersistency getPersistency() const
void sendNack(const lp::Nack &nack)
sends Nack on Face
signal::Signal< LinkService, lp::Nack > & afterReceiveNack
signals on Nack received
void close()
request the face to be closed
for internal use by FaceLogging macros
const FaceId FACEID_NULL
identifies the NullFace that drops every packet
uint64_t FaceId
identifies a face
Represents a Data packet.
const FaceId FACEID_CONTENT_STORE
identifies a packet comes from the ContentStore
const FaceId INVALID_FACEID
indicates an invalid FaceId
const FaceCounters & getCounters() const
gives access to counters provided by Face