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

Function onPacket

test/test_rns_loopback/test_rns_loopback.cpp:74–80  ·  view source on GitHub ↗

Test packet receive callback void(*)(const Bytes& data, const Packet& packet)

Source from the content-addressed store, hash-verified

72// Test packet receive callback
73//void(*)(const Bytes& data, const Packet& packet)
74void onPacket(const RNS::Bytes& data, const RNS::Packet& packet) {
75 INFO("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
76 INFOF("onPacket: data: %s", data.toHex().c_str());
77 INFOF("onPacket: text: \"%s\"", data.toString().c_str());
78 //TRACEF("onPacket: %s", packet.debugString().c_str());
79 INFO("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
80}
81
82// Ping packet receive callback
83//void(*)(const Bytes& data, const Packet& packet)

Callers

nothing calls this directly

Calls 2

toHexMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected