The Echo class extends ElementListenerLite and has an onReceivedElement to process the incoming Interest packet by sending an echo Data packet.
More...
The Echo class extends ElementListenerLite and has an onReceivedElement to process the incoming Interest packet by sending an echo Data packet.
Create an Echo.
- Parameters
-
| prefix | The prefix used for register prefix so that onReceivedElement can check if the incoming Interest packet matches. This does not make a copy; the referenced object must remain valid. |
| privateKey | The private key for signing. This does not make a copy; the referenced object must remain valid. |
| certificateName | The name for the KeyLocator. This does not make a copy; the referenced object must remain valid. |
| transport | This calls transport.send. |
| void Echo::onReceivedElement |
( |
const uint8_t * |
element, |
|
|
size_t |
elementLength |
|
) |
| |
This is called when an entire packet is received.
If this is an Interest for the prefix, create and send the echo Data packet.
- 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 files:
- examples/test-publish-async-nfd-lite.cpp
- examples/test-publish-async-nfd.cpp