mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-07-26 12:08:15 +00:00
feat: add server ping display with peer ping foundation
Adds application-level ping/pong between extension and relay server. Extension sends PING every 15s, server echoes PONG. Round-trip time displayed in Status tab (green/yellow/red color-coded). Server also forwards PING with target peerId and routes PONG back, enabling future peer-to-peer ping without server restart. Extension already responds to incoming peer PINGs. See CHANGELOG.md for details.
This commit is contained in:
+5
-1
@@ -51,7 +51,11 @@ export const EVENTS = {
|
||||
// Episode Auto-Sync
|
||||
EPISODE_LOBBY: "episode_lobby", // Broadcast: waiting for everyone on this episode
|
||||
EPISODE_READY: "episode_ready", // Response: loaded the episode and paused at 0:00
|
||||
EPISODE_LOBBY_CANCEL: "episode_lobby_cancel" // Broadcast: cancel active lobby and resume
|
||||
EPISODE_LOBBY_CANCEL: "episode_lobby_cancel", // Broadcast: cancel active lobby and resume
|
||||
|
||||
// Ping / Latency
|
||||
PING: "ping", // { t: timestamp, target?: peerId } — empty target = server echo
|
||||
PONG: "pong" // server responds with same { t } for client RTT calculation
|
||||
};
|
||||
|
||||
export const HEARTBEAT_INTERVAL = 15000; // 15s
|
||||
|
||||
Reference in New Issue
Block a user