feat(relay): send peer catch-up on join
The relay now sends PeerJoined catch-up events to a newly accepted peer for peers that were already present in the room. This makes lifecycle delivery symmetric enough for clients and gateways to learn the current room membership after welcome, not only future joins. The catch-up list is built from a cloned room snapshot before opening control event streams, so room state is not locked across QUIC I/O. Delivery remains best-effort and uses the same one-frame unidirectional control stream path as live PeerJoined and PeerLeft notifications. Test Plan: - cargo fmt --check - cargo test -p lanparty-relay \ forwards_ethernet_datagrams_between_joined_peers -- --nocapture - cargo test -p lanparty-relay - cargo clippy -p lanparty-relay --all-targets -- -D warnings - cargo test --workspace - cargo clippy --workspace --all-targets -- -D warnings - git diff --check Refs: PLAN.md
This commit is contained in:
@@ -114,7 +114,8 @@ logged with room, peer, MAC, ethertype, action, drop reason, and target count.
|
||||
Unknown unicast from a client is forwarded only to the gateway port; unknown
|
||||
unicast from the gateway is dropped instead of flooded to every remote client.
|
||||
When a peer joins or leaves, the relay sends a reliable lifecycle control event
|
||||
to peers that are still present in the room.
|
||||
to peers that are still present in the room. Newly joined peers also receive
|
||||
`PeerJoined` events for peers that were already present.
|
||||
|
||||
## Gateway
|
||||
|
||||
|
||||
Reference in New Issue
Block a user