26 #ifndef NFD_DAEMON_FACE_HPP 27 #define NFD_DAEMON_FACE_HPP 71 :
public enable_shared_from_this<Face>, noncopyable
74 Face(unique_ptr<LinkService> service, unique_ptr<Transport> transport);
192 unique_ptr<LinkService> m_service;
193 unique_ptr<Transport> m_transport;
201 return m_service.get();
207 return m_transport.get();
213 m_service->sendInterest(interest);
219 m_service->sendData(data);
225 m_service->sendNack(nack);
255 return m_transport->getLocalUri();
261 return m_transport->getRemoteUri();
267 return m_transport->getScope();
273 return m_transport->getPersistency();
279 return m_transport->setPersistency(persistency);
285 return m_transport->getLinkType();
291 return m_transport->getState();
297 return m_transport->getExpirationTime();
303 m_transport->close();
313 operator<<(std::ostream& os, const FaceLogHelper<Face>& flh);
322 #endif // NFD_DAEMON_FACE_HPP FaceUri getLocalUri() const
generalization of a network interface
TransportState
indicates the state of a transport
const FaceId FACEID_INTERNAL_FACE
identifies the InternalFace used in management
FaceState getState() const
ndn::nfd::FacePersistency getPersistency() const
represents an Interest packet
provides a lightweight signal / event system
void sendInterest(const Interest &interest)
sends Interest on Face
FaceUri getRemoteUri() const
represents a Network Nack
void setPersistency(ndn::nfd::FacePersistency persistency)
changes face persistency setting
void sendData(const Data &data)
sends Data on Face
const FaceCounters & getCounters() const
Copyright (c) 2011-2015 Regents of the University of California.
TransportState FaceState
indicates the state of a face
void setMetric(uint64_t metric)
uint64_t getMetric() const
ndn::nfd::FaceScope getScope() const
signal::Signal< LinkService, Data > & afterReceiveData
signals on Data received
const FaceId FACEID_RESERVED_MAX
upper bound of reserved FaceIds
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
Transport * getTransport() const
time::steady_clock::TimePoint getExpirationTime() const
ndn::nfd::LinkType getLinkType() const
Face(unique_ptr< LinkService > service, unique_ptr< Transport > transport)
void setId(FaceId id)
sets face ID
LinkService * getLinkService() 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
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
gives access to counters provided by Face