59 InternalForwarderTransport::doSend(Packet&& packet)
91 if (forwarderTransport !=
nullptr) {
122 encoder.appendByteArray(payload.
wire(), payload.
size());
124 this->
send(encoder.block());
void setPersistency(ndn::nfd::FacePersistency newPersistency)
changes face persistency setting
static void asyncReceive(InternalTransportBase *recipient, const Block &packet)
#define NFD_LOG_FACE_TRACE(msg)
Log a message at TRACE level.
void connectToForwarder(InternalForwarderTransport *forwarderTransport)
connect to a forwarder-side transport
const ssize_t MTU_UNLIMITED
indicates the transport has no limit on payload size
TransportState
indicates the state of a transport
void setRemoteUri(const FaceUri &uri)
signal::Signal< InternalTransportBase, Block > afterSend
stores a packet along with the remote endpoint
#define emitSignal(...)
(implementation detail)
const uint8_t * wire() const
Get pointer to encoded wire.
detail::SimulatorIo & getGlobalIoService()
Represents a TLV element of NDN packet format.
void setLinkType(ndn::nfd::LinkType linkType)
virtual void receiveFromLink(const Block &packet)=0
causes the transport to receive a link-layer packet
ReceiveCallback m_receiveCallback
abstracts a transport that can be paired with another
void receiveFromLink(const Block &packet) override
causes the transport to receive a link-layer packet
void setScope(ndn::nfd::FaceScope scope)
size_t size() const
Get size of encoded wire, including Type-Length-Value.
implements a forwarder-side transport that can be paired with another
#define NFD_LOG_FACE_INFO(msg)
Log a message at INFO level.
Copyright (c) 2011-2015 Regents of the University of California.
signal::Signal< Transport, TransportState, TransportState > afterStateChange
signals when transport state changes
the transport is closed, and can be safely deallocated
void post(const std::function< void()> &callback)
NFD_LOG_MEMBER_INIT(InternalForwarderTransport, InternalForwarderTransport)
void setLocalUri(const FaceUri &uri)
represents the underlying protocol and address used by a Face
size_t appendByteArray(const uint8_t *array, size_t length)
Append a byte array array of length length.
void receiveFromLink(const Block &packet) override
causes the transport to receive a link-layer packet
void disconnect()
Manually disconnect the connection.
void doClose() override
performs Transport specific operations to close the transport
void setState(TransportState newState)
set transport state
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 receive(Packet &&packet)
receive a link-layer packet
void send(const Block &wire) override
send a TLV block through the transport
EncodingImpl< EncoderTag > EncodingBuffer
Block packet
the packet as a TLV block