The ElementReceiver class extends ElementListenerLite and has an onReceivedElement to process the incoming Data packet.
More...
The ElementReceiver class extends ElementListenerLite and has an onReceivedElement to process the incoming Data packet.
| ElementReceiver::ElementReceiver |
( |
const InterestLite & |
originalInterest | ) |
|
|
inline |
Create an ElementReceiver.
- Parameters
-
| originalInterest | The original Interest so that onReceivedElement can check if the incoming Data packet matches. This does not make a copy; the referenced object must remain valid. |
| void ElementReceiver::onReceivedElement |
( |
const uint8_t * |
element, |
|
|
size_t |
elementLength |
|
) |
| |
This is called when an entire packet is received.
If this is a Data packet for the original Interest that was sent, display its name and content.
- Parameters
-
| element | pointer to the element. This buffer is only valid during this call. If you need the data later, you must copy. |
| elementLength | length of element |
The documentation for this class was generated from the following file:
- examples/test-echo-consumer-lite.cpp