Trim direct retry cleanup

This commit is contained in:
mikecarper committed 2026-06-16 13:15:52 -07:00
1 parent 4ed9415866
commit 7d2ff38120
4 files changed
+10 -21

No files matched your search

+8 -2
View File
@@ -111,8 +111,6 @@ protected:
/**
* \brief Allow subclasses to rewrite a non-TRACE DIRECT packet path when this node can safely skip ahead.
*/
virtual bool maybeShortCircuitDirect(Packet* packet) { return false; }
/**
* \returns milliseconds to wait for the next-hop echo before queueing one retry of the DIRECT packet.
*/
@@ -190,6 +188,8 @@ protected:
/**
* \brief A path TO peer (sender_idx) has been received. (also with optional 'extra' data encoded)
* NOTE: these can be received multiple times (per sender), via different routes
* NOTE: these can be received multiple times (per sender), via differen routes
* \param sender_idx index of peer, [0..n) where n is what searchPeersByHash() returned
* \param secret the pre-calculated shared-secret (handy for sending response packet)
* \returns true, if path was accepted and that reciprocal path should be sent
@@ -212,6 +212,8 @@ protected:
/**
* \brief A path TO 'sender' has been received. (also with optional 'extra' data encoded)
* NOTE: these can be received multiple times (per sender), via different routes
* NOTE: these can be received multiple times (per sender), via differen routes
*/
virtual void onPathRecv(Packet* packet, Identity& sender, uint8_t* path, uint8_t path_len, uint8_t extra_type, uint8_t* extra, uint8_t extra_len) { }
@@ -293,10 +295,14 @@ public:
void sendDirect(Packet* packet, const uint8_t* path, uint8_t path_len, uint32_t delay_millis=0);
/**
* \brief send a locally-generated Packet to just neighbor nodes (zero hops)
* \brief send a locally-generated Packet to just neigbor nodes (zero hops)
*/
void sendZeroHop(Packet* packet, uint32_t delay_millis=0);
/**
* \brief send a locally-generated Packet to just neighbor nodes (zero hops), with specific transport codes
* \brief send a locally-generated Packet to just neigbor nodes (zero hops), with specific transort codes
* \param transport_codes array of 2 codes to attach to packet
*/
void sendZeroHop(Packet* packet, uint16_t* transport_codes, uint32_t delay_millis=0);