MCPcopy Create free account
hub / github.com/attermann/microReticulum / onPacket

Function onPacket

examples/udp_announce/src/main.cpp:64–70  ·  view source on GitHub ↗

Test packet receive callback

Source from the content-addressed store, hash-verified

62
63// Test packet receive callback
64void onPacket(const RNS::Bytes& data, const RNS::Packet& packet) {
65 INFO("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
66 INFOF("onPacket: data: %s", data.toHex().c_str());
67 INFOF("onPacket: text: \"%s\"", data.toString().c_str());
68 //TRACEF("onPacket: %s", packet.debugString().c_str());
69 INFO("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
70}
71
72// Ping packet receive callback
73void onPingPacket(const RNS::Bytes& data, const RNS::Packet& packet) {

Callers

nothing calls this directly

Calls 2

toHexMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected