W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > September 2011

[Bug 14115] New: WebSocket API should allow sending WS Ping frames from client to server

From: <bugzilla@jessica.w3.org>
Date: Mon, 12 Sep 2011 09:29:39 +0000
To: public-html-bugzilla@w3.org
Message-ID: <bug-14115-2486@http.www.w3.org/Bugs/Public/>

           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,

WebSocket API does not define how the client can send a Ping frame:


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");

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 the QA contact for the bug.
Received on Monday, 12 September 2011 09:29:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:31:18 UTC