|
esp8266ndn
NDN Arduino library for ESP8266 and more
|
NDNLPv2 fragmenter. More...
#include <lp.hpp>
Inherits ndnph::WithRegion.
Public Member Functions | |
| Reassembler (Region ®ion) | |
| Constructor. | |
| void | discard () |
| Discard the reassembly buffer. | |
| bool | add (const Fragment &frag) |
| Add a fragment. | |
| PacketClassify | reassemble () const |
| Reassemble the packet if it's complete. | |
Public Member Functions inherited from ndnph::WithRegion | |
| WithRegion (WithRegion &&)=default | |
Additional Inherited Members | |
Protected Member Functions inherited from ndnph::WithRegion | |
| WithRegion (Region ®ion) | |
| WithRegion (const WithRegion &)=delete | |
| WithRegion & | operator= (const WithRegion &)=delete |
Protected Attributes inherited from ndnph::WithRegion | |
| Region & | region |
NDNLPv2 fragmenter.
|
inlineexplicit |
Constructor.
| region | where to allocate memory for fragment payloads. This region may be shared with others fragmenters and reassemblers. |
|
inline |
Add a fragment.
If FragIndex is 0:
If frag comes after the previous fragment:
Otherwise:
|
inline |
Discard the reassembly buffer.
When the region is reset elsewhere (e.g. in another fragmenter or reassembler sharing the region), this function should be invoked to discard the reassembly buffer. Otherwise, undefined behavior may occur.
|
inline |
Reassemble the packet if it's complete.
If the reassembly buffer contains a complete packet, return the reassembled packet. Otherwise, return a PacketClassify with Type::None .