diff --git a/src/native/skate3_native_ghost_relay.cpp b/src/native/skate3_native_ghost_relay.cpp index c124b97..af2fdb8 100644 --- a/src/native/skate3_native_ghost_relay.cpp +++ b/src/native/skate3_native_ghost_relay.cpp @@ -489,10 +489,20 @@ void GhostRelay::Sweep(double now) { if (now <= 0.0) { return; } - clients_.erase(std::remove_if(clients_.begin(), clients_.end(), - [now](const Client& c) { - return now - c.last_seen > kClientTimeoutSec; - }), + const bool verbose = verbose_.load(std::memory_order_relaxed); + clients_.erase(std::remove_if( + clients_.begin(), clients_.end(), + [now, verbose](const Client& c) { + const bool stale = now - c.last_seen > kClientTimeoutSec; + if (stale && verbose) { + GHOST_RELAY_INFO("{} timed out ({}s silence; {} joined " + "room '{}')", + GhostAddrStr(c.addr), + int(now - c.last_seen), c.session_id, + std::string(c.room, c.room_len)); + } + return stale; + }), clients_.end()); } diff --git a/src/skate3_native_ghost_dialog.cpp b/src/skate3_native_ghost_dialog.cpp index 7965d07..ce3ba79 100644 --- a/src/skate3_native_ghost_dialog.cpp +++ b/src/skate3_native_ghost_dialog.cpp @@ -3,11 +3,13 @@ #include #include #include +#include #include #include #include +#include #include "native/skate3_native_ghost.h" #include "skate3_native_scene.h" @@ -216,6 +218,20 @@ void GhostDialog::OnDraw(ImGuiIO& io) { if (st.peer[0] != '\0') { ImGui::Text(" Relay: %s", st.peer); } + // netcode-revival: the game's own netcode transport (RakNet via the relay). + { + using rex::system::XNetTransport; + ImGui::Text(" Netcode: %s", + XNetTransport::Instance().Active() + ? "relay joined" + : "not connected"); + const std::vector xnet_sessions = + XNetTransport::Instance().Sessions(); + if (!xnet_sessions.empty()) { + ImGui::Text(" Sessions: %zu discoverable", + xnet_sessions.size()); + } + } if (st.refused) { ImGui::TextColored(ImVec4(1.0f, 0.5f, 0.3f, 1.0f), " Refused by relay (protocol version mismatch)"); diff --git a/third_party/rexglue-sdk b/third_party/rexglue-sdk index 01fe706..3ec27d1 160000 --- a/third_party/rexglue-sdk +++ b/third_party/rexglue-sdk @@ -1 +1 @@ -Subproject commit 01fe706c13038c861e028b52384c3922c98e80da +Subproject commit 3ec27d115b0a6ff3ac20fe4486239150c3872e25