TWIN: forward mirrored audio/flush to satellites + integration tests

TwinLink::handleMsgTrunkAudio and handleMsgTrunkFlush now call
forwardAudioToSatellitesExcept / forwardFlushToSatellitesExcept,
mirroring TrunkLink. Without this, satellites attached to a twin
member only saw talker-state updates for traffic originated on the
partner — the audio frames themselves were dropped.

Adds test_09 (satellite handshakes with the twin parent) and test_10
(client on ref2 transmits; satellite on ref1 receives TalkerStart +
audio frames via the TWIN-mirror path). Wires a [SATELLITE] section
and host port mapping into the twin topology generator and lets
SatellitePeer.connect_satellite take an explicit port override.
This commit is contained in:
Audric committed 2026-04-16 00:18:27 +02:00
1 parent 7507c116e6
commit 337cfa7208
5 files changed
+169 -7

No files matched your search

+11 -5
View File
@@ -296,12 +296,18 @@ class TrunkPeer:
class SatellitePeer(TrunkPeer):
"""Satellite peer — same wire format as TrunkPeer but role=SATELLITE."""
def connect_satellite(self, name=None):
"""Connect to the satellite port of a reflector."""
if name is None:
name = sorted(T.REFLECTORS)[0]
def connect_satellite(self, name=None, port=None):
"""Connect to the satellite port of a reflector.
If `port` is provided it overrides the default-topology lookup, so
the twin-topology tests can point at a different host port without
duplicating this class.
"""
host = HOST
port = T.mapped_satellite_port(name)
if port is None:
if name is None:
name = sorted(T.REFLECTORS)[0]
port = T.mapped_satellite_port(name)
self.connect(host, port)
def handshake(self, sat_id=SAT_ID, secret=SAT_SECRET, priority=None,