Wrap another transport.
More...
#include <transport.hpp>
Inherits ndnph::transport::Transport.
Inherited by ndnph::transport::ForceEndpointId, and ndnph::transport::Tracer.
|
| virtual void | handleRx (const uint8_t *pkt, size_t pktLen, uint64_t endpointId) |
| |
| bool | doIsUp () const override |
| |
| void | doLoop () override |
| |
| bool | doSend (const uint8_t *pkt, size_t pktLen, uint64_t endpointId) override |
| |
|
| using | RxCallback = void(*)(void *ctx, const uint8_t *pkt, size_t pktLen, uint64_t endpointId) |
| |
| virtual | ~Transport ()=default |
| |
| bool | isUp () const |
| | Determine whether transport is connected.
|
| |
| void | loop () |
| | Process periodical events, such as receiving packets.
|
| |
| void | setRxCallback (RxCallback cb, void *ctx) |
| | Set incoming packet callback.
|
| |
| bool | send (const uint8_t *pkt, size_t pktLen, uint64_t endpointId=0) |
| | Synchronously transmit a packet.
|
| |
Wrap another transport.
This class passes every call to the inner Transport. It should be inherited, and some functions can be overridden to achieve custom behavior.
◆ TransportWrap()
| ndnph::transport::TransportWrap::TransportWrap |
( |
Transport & |
inner | ) |
|
|
inlineexplicitprotected |
◆ doIsUp()
| bool ndnph::transport::TransportWrap::doIsUp |
( |
| ) |
const |
|
inlineoverrideprivatevirtual |
◆ doLoop()
| void ndnph::transport::TransportWrap::doLoop |
( |
| ) |
|
|
inlineoverrideprivatevirtual |
◆ doSend()
| bool ndnph::transport::TransportWrap::doSend |
( |
const uint8_t * |
pkt, |
|
|
size_t |
pktLen, |
|
|
uint64_t |
endpointId |
|
) |
| |
|
inlineoverrideprivatevirtual |
◆ handleRx()
| virtual void ndnph::transport::TransportWrap::handleRx |
( |
const uint8_t * |
pkt, |
|
|
size_t |
pktLen, |
|
|
uint64_t |
endpointId |
|
) |
| |
|
inlineprivatevirtual |
◆ inner
| Transport& ndnph::transport::TransportWrap::inner |
|
protected |
The documentation for this class was generated from the following file: