# Clarification Needed on Socket Configurations

**URL:** <https://forum.heroiclabs.com/t/clarification-needed-on-socket-configurations/5685>\
**Category:** Runtime Framework\
**Created:** [October 2, 2024, 8:24am UTC](https://forum.heroiclabs.com/t/clarification-needed-on-socket-configurations/5685 "2024-10-02T08:24:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anil-gg](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@anil-gg](https://forum.heroiclabs.com/u/anil-gg)\
**Post date:** [October 2, 2024, 8:24am UTC](https://forum.heroiclabs.com/t/clarification-needed-on-socket-configurations/5685/1 "2024-10-02T08:24:35Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![gulliversgames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/gulliversgames/32/2322_2.png) [@gulliversgames](https://forum.heroiclabs.com/u/gulliversgames)\
**Post date:** [October 7, 2024, 8:53am UTC](https://forum.heroiclabs.com/t/clarification-needed-on-socket-configurations/5685/2 "2024-10-07T08:53:50Z")

</div>

Same here. It would be great to understand how `idle_timeout_ms` works.
