If I have a websocket connection open between a server and a desktop client, is it true that there is no data or bandwidth being used or exchanged between the two except for when I explicitly send some? And if that is true, does that mean I could essentially have thousands of open connections on a server at a time so long as data was only being transferred very infrequently?
Technically yes. Although the WebSocket protocol has ping/pong frames, and the any of the two ends can send pings periodically and expect pongs as answers, otherwise the would kill the connection.
It would be a very bad idea not implement a "keep alive" mechanism, you won't be able of tell which connections are actually connected or improperly closed.
http://blog.stephencleary.com/2009/05/detection-of-half-open-dropped.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With