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);
316 typename std::enable_if<std::is_base_of<Face, T>::value, std::ostream&>::type
317 operator<<(std::ostream& os, const FaceLogHelper<T>& flh)
319 return os << FaceLogHelper<Face>(flh.obj);
329 #endif // NFD_DAEMON_FACE_HPP
generalization of a network interface
TransportState
indicates the state of a transport
represents the underlying protocol and address used by a Face
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
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
const FaceId FACEID_NULL
identifies the NullFace that drops every packet
uint64_t FaceId
identifies a face
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