- From: <bugzilla@jessica.w3.org>
- Date: Mon, 12 Sep 2011 09:29:39 +0000
- To: public-html@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14115 Summary: WebSocket API should allow sending WS Ping frames from client to server Product: HTML WG Version: unspecified Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: HTML5 spec (editor: Ian Hickson) AssignedTo: ian@hixie.ch ReportedBy: ibc@aliax.net QAContact: public-html-bugzilla@w3.org CC: mike@w3.org, public-html-wg-issue-tracking@w3.org, public-html@w3.org 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". -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
Received on Monday, 12 September 2011 09:29:47 UTC