diff --git a/index.bs b/index.bs index e59a544..f0294f4 100644 --- a/index.bs +++ b/index.bs @@ -495,7 +495,7 @@ that must be supported, as [=event handler IDL attributes=], by all objects impl -# Feedback from the protocol # {#feedback-from-the-protocol} +## Feedback from the protocol ## {#feedback-from-the-protocol} When [=the WebSocket connection is established=], the user agent must [=queue a task=] to run these steps: @@ -636,23 +636,8 @@ The [=task source=] for all [=tasks=] queued in this se WebSocket task source. -# Ping and Pong frames # {#ping-and-pong-frames} - -The WebSocket protocol defines Ping and Pong frames that can be used for keep-alive, -heart-beats, network status probing, latency instrumentation, and so forth. These are not currently -exposed in the API. -User agents may send ping and unsolicited pong frames as desired, for example in an attempt to -maintain local network NAT mappings, to detect failed connections, or to display latency metrics to -the user. User agents must not use pings or unsolicited pongs to aid the server; it is assumed that -servers will solicit pongs whenever appropriate for the server's needs. - - - - -# The {{CloseEvent}} interface # {#the-closeevent-interface} +## The {{CloseEvent}} interface ## {#the-closeevent-interface} {{WebSocket}} objects use the {{CloseEvent}} interface for their {{WebSocket/close}} events: @@ -1303,6 +1288,24 @@ To close the WebSocket for a {WebSocket} or {WebSocketStream} [=this= {{WebSocketStream/closed}} promise will resolve, depending on the type of [=this=]. + +# Ping and Pong frames # {#ping-and-pong-frames} + +The WebSocket protocol defines Ping and Pong frames that can be used for keep-alive, +heart-beats, network status probing, latency instrumentation, and so forth. These are not currently +exposed in the API. + +User agents may send ping and unsolicited pong frames as desired, for example in an attempt to +maintain local network NAT mappings, to detect failed connections, or to display latency metrics to +the user. User agents must not use pings or unsolicited pongs to aid the server; it is assumed that +servers will solicit pongs whenever appropriate for the server's needs. + + + + +

Acknowledgments

Until the creation of this standard in 2021, the text here was maintained in the