Cheap routing optimizations

- Don't relay back to sender or relayer
- Only send to connected device if recipientID matches one
- Don't relay our own ACK/read receipt
This commit is contained in:
GUVWAF
2025-07-12 13:18:09 +02:00
parent 4545afb0c4
commit d1085fde0b
6 changed files with 216 additions and 114 deletions
@@ -0,0 +1,13 @@
package com.bitchat.android.model
import com.bitchat.android.protocol.BitchatPacket
/**
* Represents a routed packet with additional metadata
* Used for processing and routing packets in the mesh network
*/
data class RoutedPacket(
val packet: BitchatPacket,
val peerID: String? = null, // Who sent it (parsed from packet.senderID)
val relayAddress: String? = null // Address it came from (for avoiding loopback)
)