26 #ifndef NFD_DAEMON_FACE_TRANSPORT_HPP 27 #define NFD_DAEMON_FACE_TRANSPORT_HPP 32 #include <ndn-cxx/encoding/nfd-constants.hpp> 176 getLinkService()
const;
183 virtual const Counters&
221 getRemoteUri()
const;
230 ndn::nfd::FacePersistency
231 getPersistency()
const;
242 canChangePersistencyTo(ndn::nfd::FacePersistency newPersistency)
const;
247 setPersistency(ndn::nfd::FacePersistency newPersistency);
271 getSendQueueCapacity()
const;
286 time::steady_clock::TimePoint
287 getExpirationTime()
const;
294 getSendQueueLength();
298 setLocalUri(
const FaceUri& uri);
301 setRemoteUri(
const FaceUri& uri);
304 setScope(ndn::nfd::FaceScope scope);
307 setLinkType(ndn::nfd::LinkType linkType);
313 setSendQueueCapacity(ssize_t sendQueueCapacity);
323 setState(TransportState newState);
326 setExpirationTime(
const time::steady_clock::TimePoint& expirationTime);
336 canChangePersistencyToImpl(ndn::nfd::FacePersistency newPersistency)
const;
345 afterChangePersistency(ndn::nfd::FacePersistency oldPersistency);
364 doSend(
Packet&& packet) = 0;
371 ndn::nfd::FaceScope m_scope;
372 ndn::nfd::FacePersistency m_persistency;
373 ndn::nfd::LinkType m_linkType;
375 size_t m_sendQueueCapacity;
376 TransportState m_state;
377 time::steady_clock::TimePoint m_expirationTime;
428 inline ndn::nfd::FaceScope
440 inline ndn::nfd::FacePersistency
443 return m_persistency;
446 inline ndn::nfd::LinkType
455 m_linkType = linkType;
467 BOOST_ASSERT(mtu == MTU_UNLIMITED || mtu > 0);
474 return m_sendQueueCapacity;
480 m_sendQueueCapacity = sendQueueCapacity;
489 inline time::steady_clock::TimePoint
492 return m_expirationTime;
498 m_expirationTime = expirationTime;
502 operator<<(std::ostream& os, const FaceLogHelper<Transport>& flh);
505 typename std::enable_if<std::is_base_of<Transport, T>::value &&
506 !std::is_same<Transport, T>::value, std::ostream&>::type
507 operator<<(std::ostream& os, const FaceLogHelper<T>& flh)
509 return os << FaceLogHelper<Transport>(flh.obj);
515 #endif // NFD_DAEMON_FACE_TRANSPORT_HPP void setSendQueueCapacity(ssize_t sendQueueCapacity)
const ssize_t QUEUE_UNSUPPORTED
indicates that the transport does not support reading the queue capacity/length
void setLocalUri(const FaceUri &uri)
void setScope(ndn::nfd::FaceScope scope)
represents a counter of number of bytes
const ssize_t MTU_UNLIMITED
indicates the transport has no limit on payload size
TransportState
indicates the state of a transport
const ssize_t MTU_INVALID
(for internal use) indicates MTU field is unset
Block packet
the packet as a TLV block
std::ostream & operator<<(std::ostream &os, const FaceLogHelper< Face > &flh)
const ssize_t QUEUE_ERROR
indicates that the transport was unable to retrieve the queue capacity/length
ndn::nfd::LinkType getLinkType() const
signal::Signal< Transport, TransportState, TransportState > afterStateChange
signals when transport state changes
FaceUri getRemoteUri() const
stores a packet along with the remote endpoint
ByteCounter nInBytes
total incoming bytes
represents a counter of number of packets
TransportCounters Counters
counters provided by Transport
the transport is being closed due to a failure
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
the transport is closed, and can be safely deallocated
PacketCounter nInPackets
count of incoming packets
uint64_t EndpointId
identifies an endpoint on the link
const Face * getFace() const
generalization of a network interface
void setLinkType(ndn::nfd::LinkType linkType)
ndn::nfd::FaceScope getScope() const
the transport is being closed gracefully, either by the peer or by a call to close() ...
PacketCounter nOutPackets
count of outgoing packets
ndn::nfd::FacePersistency getPersistency() const
counters provided by Transport
const LinkService * getLinkService() const
TransportState getState() const
EndpointId remoteEndpoint
identifies the remote endpoint
FaceUri getLocalUri() const
ssize_t getSendQueueCapacity() const
void setRemoteUri(const FaceUri &uri)
the transport is up and can transmit packets
time::steady_clock::TimePoint getExpirationTime() const
ByteCounter nOutBytes
total outgoing bytes
void setExpirationTime(const time::steady_clock::TimePoint &expirationTime)
virtual const Counters & getCounters() const
the transport is temporarily down, and is being recovered