feat(ctrl): report gateway presence in welcome
ServerWelcome now carries an initial gateway_connected flag with serde defaulting for older welcome payloads. The relay sets it from room admission state so a gateway sees itself as connected, clients joining behind an existing gateway see yes, and clients that arrive first see no. The Windows client prints that handshake fact at startup. This does not replace the later peer-event stream; it gives phase-1 diagnostics an immediate answer for whether the relay already has a LAN gateway in the room. Test Plan: - cargo fmt --check - cargo test -p lanparty-ctrl -p lanparty-relay -p lanparty-client-core \ -p lanparty-client-win - cargo clippy -p lanparty-ctrl -p lanparty-relay -p lanparty-client-core \ -p lanparty-client-win --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:
@@ -109,10 +109,11 @@ async fn main() -> Result<()> {
|
||||
|
||||
let session = connect_client(config).await?;
|
||||
println!(
|
||||
"lanparty-client-win connected as peer {} in room id {} with TAP MTU {}",
|
||||
"lanparty-client-win connected as peer {} in room id {} with TAP MTU {}; LAN gateway connected {}",
|
||||
session.welcome().peer_id(),
|
||||
session.welcome().room_id(),
|
||||
session.welcome().effective_tap_mtu()
|
||||
session.welcome().effective_tap_mtu(),
|
||||
yes_no(session.welcome().gateway_connected())
|
||||
);
|
||||
#[cfg(windows)]
|
||||
let relay_route_pin = match pin_relay_route_before_tap(session.config().relay_addr().ip()) {
|
||||
|
||||
Reference in New Issue
Block a user