mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 11:25:21 +00:00
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:
@@ -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)
|
||||
)
|
||||
Reference in New Issue
Block a user