Files
archy-messh/host-bridge/__pycache__/bridge_core.cpython-313.pyc
T

29 lines
3.8 KiB
Plaintext
Raw Normal View History

ó
6^DjEãófSrSSKrSSKrSSKrSSKrSSKJr \"SS55r"SS5rg)Shared message bus + loop-prevention core for the archy-messh Phase 0 bridge.
Each protocol adapter runs on its own thread/event loop (Meshtastic's pubsub
callbacks fire from its internal reader thread, MeshCore is asyncio-native,
Reticulum/LXMF invoke callbacks from RNS's internal transport thread). All
three push into this single thread-safe queue so one dispatcher can fan
messages out across protocols without each adapter needing to know about
the others.
éN)Ú dataclasscó>\rSrSr%\\S'\\S'\\S'\\S'Srg)Ú
BridgeMessageéÚnetworkÚsenderÚtextÚ received_at©N)Ú__name__Ú
__module__Ú __qualname__Ú__firstlineno__ÚstrÚ__annotations__ÚfloatÚ__static_attributes__r óÚbridge_core.pyrrsà
ƒLØ ƒKØ
ƒIØÖrrcó†\rSrSrSrSS\4Sjjr\S\S\4Sj5r S\
SS 4S
jr S\S\ 4S jr
SS \S -S\
4S
jjrSrg )Ú
MessageBuséaThread-safe inbox with content-hash dedup to prevent repeat loops.
Dedup is content-hash based (not per-network packet-id based), since the
whole point of the bridge is that the same text shows up natively on all
three networks once relayed. A short TTL window is enough to stop the
obvious loop (bridge re-hears its own relayed copy) without needing any
cross-protocol message-id scheme, which doesn't exist.
Údedup_ttl_secondscó†[R"5UlXl0Ul[
R "5Ulg©N)ÚqueueÚQueueÚ_queueÚ