Hello everyone,
I’ve been working with the Nakama framework to manage WebSocket connections for real-time gameplay, and I’m trying to understand how some of the socket timeout configurations interact with each other, particularly socket.idle_timeout_ms
, socket.ping_period_ms
, and socket.pong_wait_ms
.
It seems like the disconnection always happens when pong_wait_ms
is exceeded, not when idle_timeout_ms
is reached. Even when there’s no game logic activity, my WebSocket connection stays alive as long as pings and pongs are exchanged. But if a pong doesn’t arrive within pong_wait_ms
, the connection closes.
This makes me wonder how exactly idle_timeout_ms
fits into the picture when using WebSockets. The ping-pong mechanism seems to dominate the connection’s aliveness, and I don’t notice any additional effect from idle_timeout_ms
.
Can you explain how these configurations interact with each other and the specific purpose of idle_timeout_ms
in this context?
Thanks in advance!