Implement satellite reflectors
Satellite reflectors are lightweight relay instances that connect to a parent reflector instead of joining the full trunk mesh. Clients connect to the satellite normally; it relays all TGs bidirectionally to the parent. The parent forwards satellite events to local clients, trunk peers, and other satellites. New classes: - SatelliteLink: parent-side handler for each inbound satellite connection (HMAC auth, heartbeat, all-TG relay) - SatelliteClient: satellite-side outbound connection to parent Wire protocol: MsgTrunkHello gains m_role field (ROLE_PEER=0, ROLE_SATELLITE=1) to distinguish satellite handshakes. Config: - Parent: [SATELLITE] section with LISTEN_PORT and SECRET - Satellite: SATELLITE_OF, SATELLITE_PORT, SATELLITE_SECRET in [GLOBAL] HTTP /config endpoint now shows mode (reflector/satellite), satellite_server config on parents, and satellite connection info. Docs updated: README, DEPLOYMENT_ITALY, Italian translation.
This commit is contained in:
1 parent
166e57f445
commit
551cfa70cd
13 files changed
+1159
-20
No files matched your search
@@ -531,6 +531,9 @@ void TrunkLink::handleMsgTrunkAudio(std::istream& is)
|
||||
// Rebuild a UDP audio message and broadcast to local clients on this TG
|
||||
MsgUdpAudio udp_msg(msg.audio());
|
||||
m_reflector->broadcastUdpMsg(udp_msg, ReflectorClient::TgFilter(tg));
|
||||
|
||||
// Forward trunk audio to connected satellites
|
||||
m_reflector->forwardAudioToSatellitesExcept(nullptr, tg, msg.audio());
|
||||
} /* TrunkLink::handleMsgTrunkAudio */
|
||||
|
||||
|
||||
@@ -552,6 +555,9 @@ void TrunkLink::handleMsgTrunkFlush(std::istream& is)
|
||||
|
||||
m_reflector->broadcastUdpMsg(MsgUdpFlushSamples(),
|
||||
ReflectorClient::TgFilter(tg));
|
||||
|
||||
// Forward trunk flush to connected satellites
|
||||
m_reflector->forwardFlushToSatellitesExcept(nullptr, tg);
|
||||
} /* TrunkLink::handleMsgTrunkFlush */
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user