esp8266ndn
NDN Arduino library for ESP8266 and more
|
NDNLPv2 fragmenter. More...
#include <lp.hpp>
Inherits ndnph::WithRegion.
Classes | |
class | Fragment |
Singly linked list of encodable fragments. More... | |
Public Member Functions | |
Fragmenter (Region ®ion, uint16_t mtu) | |
Constructor. More... | |
template<typename L3 > | |
const Fragment * | fragment (Encodable< L3 > packet) |
Fragment an LP packet. More... | |
![]() | |
WithRegion (WithRegion &&)=default | |
Additional Inherited Members | |
![]() | |
WithRegion (Region ®ion) | |
WithRegion (const WithRegion &)=delete | |
WithRegion & | operator= (const WithRegion &)=delete |
![]() | |
Region & | region |
NDNLPv2 fragmenter.
|
inlineexplicit |
Constructor.
region | where to allocate memory for fragment payloads. This region may be shared with others fragmenters and reassemblers. |
mtu | maximum output packet size including NDNLPv2 headers. |
|
inline |
Fragment an LP packet.
L3 | Interest, Data, or their signed variants. |
Each fragment()
invocation resets the region passed to the constructor. If the region is shared with a reassembler, Reassembler::discard
should be invoked to clear the reassembler buffer.
When the region is reset by any means, previously returned fragments are invalidated.