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);
86 sendInterest(
const Interest& interest);
91 sendData(
const Data& data);
123 setMetric(uint64_t metric);
136 getRemoteUri()
const;
146 getPersistency()
const;
172 getExpirationTime()
const;
192 unique_ptr<LinkService> m_service;
193 unique_ptr<Transport> m_transport;
199 Face::getLinkService()
201 return m_service.get();
207 return m_transport.get();
211 Face::sendInterest(
const Interest& interest)
213 m_service->sendInterest(interest);
217 Face::sendData(
const Data& data)
219 m_service->sendData(data);
223 Face::sendNack(
const lp::Nack& nack)
225 m_service->sendNack(nack);
235 Face::setId(FaceId
id)
241 Face::setMetric(uint64_t metric)
247 Face::getMetric()
const 253 Face::getLocalUri()
const 255 return m_transport->getLocalUri();
259 Face::getRemoteUri()
const 261 return m_transport->getRemoteUri();
265 Face::getScope()
const 267 return m_transport->getScope();
271 Face::getPersistency()
const 273 return m_transport->getPersistency();
279 return m_transport->setPersistency(persistency);
283 Face::getLinkType()
const 285 return m_transport->getLinkType();
289 Face::getState()
const 291 return m_transport->getState();
295 Face::getExpirationTime()
const 297 return m_transport->getExpirationTime();
303 m_transport->close();
307 Face::getCounters()
const 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
signal::Signal< LinkService, Interest > & afterReceiveInterest
signals on Interest received
TransportState
indicates the state of a transport
represents the underlying protocol and address used by a Face
const FaceId FACEID_INTERNAL_FACE
identifies the InternalFace used in management
represents an Interest packet
provides a lightweight signal / event system
represents a Network Nack
signal::Signal< LinkService, lp::Nack > & afterReceiveNack
signals on Nack received
Copyright (c) 2011-2015 Regents of the University of California.
TransportState FaceState
indicates the state of a face
const FaceId FACEID_RESERVED_MAX
upper bound of reserved FaceIds
signal::Signal< Transport, FaceState, FaceState > & afterStateChange
signals after face state changed
A multicast Transport that uses raw Ethernet II frames.
signal::Signal< LinkService, Data > & afterReceiveData
signals on Data received
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
gives access to counters provided by Face