36 ndn::nfd::FaceScope scope, ndn::nfd::LinkType linkType)
58 InternalForwarderTransport::doSend(
const Block& packet)
76 if (m_forwarder !=
nullptr) {
86 if (m_forwarder !=
nullptr) {
89 m_fwTransportStateConn.disconnect();
92 m_forwarder = forwarder;
94 if (m_forwarder !=
nullptr) {
111 if (m_receiveCallback) {
112 m_receiveCallback(packet);
void connectToForwarder(InternalForwarderTransport *forwarder)
Connect to a forwarder-side transport.
void receivePacket(const Block &packet) final
void send(const Block &block) final
~InternalClientTransport() final
Implements a forwarder-side transport that can be paired with another transport.
InternalForwarderTransport(const FaceUri &localUri=FaceUri("internal://"), const FaceUri &remoteUri=FaceUri("internal://"), ndn::nfd::FaceScope scope=ndn::nfd::FACE_SCOPE_LOCAL, ndn::nfd::LinkType linkType=ndn::nfd::LINK_TYPE_POINT_TO_POINT)
void setPeer(InternalTransportBase *peer)
void doClose() final
performs Transport specific operations to close the transport
void receivePacket(const Block &packet) final
virtual void receivePacket(const Block &packet)=0
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
void setScope(ndn::nfd::FaceScope scope)
void setLinkType(ndn::nfd::LinkType linkType)
void setLocalUri(const FaceUri &uri)
void setRemoteUri(const FaceUri &uri)
signal::Signal< Transport, TransportState, TransportState > afterStateChange
signals when transport state changes
void setState(TransportState newState)
set transport state
void receive(const Block &packet, const EndpointId &endpoint=0)
Pass a received link-layer packet to the upper layer for further processing.
#define NFD_LOG_FACE_DEBUG(msg)
Log a message at DEBUG level.
#define NFD_LOG_FACE_TRACE(msg)
Log a message at TRACE level.
#define NFD_LOG_MEMBER_INIT(cls, name)
TransportState
Indicates the state of a transport.
@ CLOSED
the transport is closed, and can be safely deallocated
const ssize_t MTU_UNLIMITED
indicates the transport has no limit on payload size
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents,...
boost::asio::io_service & getGlobalIoService()
Returns the global io_service instance for the calling thread.