This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
WebSocket API does not define how the client can send a Ping frame: http://dev.w3.org/html5/websockets/#the-websocket-interface Sometimes the Internet connection is gone and the client has not realized that the TCP connection is dead (it does not realize of it until it tries to send data over the connetion). So, in this case, the client has no way to realize that the TCP connection (or the WS connection) is unavailable. The only way would be defining a "ping" mechanism at WS subprotocol level, which would be ugly having Ping/Pong frames already defined in WS transport protocol. So, IMHO the WS API should include a mechanism for the client (the web browser typically) to send WS ping to the server periodically. For example: var myWS = new WebSocket("ws://some-domain.com"); myWS.monitor_interval(120); In this way, the API user instructs the WebSocket client to send a Ping frame every 120 seconds. In case a Pong is not received within N seconds (to define) the WS socket state would become "DISCONNECTED" or "DISCONNECTING".
Is this a dup of Web Socket API bug 13104: http://www.w3.org/Bugs/Public/show_bug.cgi?id=13104 Also, seems like this should be assigned to WebApps Web Socket API spec.
*** This bug has been marked as a duplicate of bug 13104 ***