W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2010

[whatwg] WebSocket closing handshake

From: Simon Pieters <simonp@opera.com>
Date: Fri, 30 Apr 2010 14:07:45 +0200
Message-ID: <op.vby5a7vlidj3kv@simon-pieterss-macbook.local>
start the WebSocket closing handshake:

[[
Note: The closing handshake finishes once the server returns the 0xFF  
packet, as described above.
]]

I assume it should say 0xFF frame, not packet.

This note is only true when the client sends the closing handshake first.

...except that I can't find anywhere in the server part to send 0xFF 0x00  
when it receives 0xFF 0x00 from the client. I just see:

[[
5. If type is 0xFF and length is 0, then set the client terminated flag  
and abort these steps. All further data sent by the client should be  
discarded.
]]

and:

[[
At any time, the server may decide to terminate the WebSocket connection  
by running through the following steps:

Send a 0xFF byte and a 0x00 byte to the client to indicate the start of  
the closing handshake.

Wait until the client terminated flag has been set, or until a  
server-defined timeout expires.

Close the WebSocket connection.
]]

I'm confused at this point how the closing handshake is supposed to work.

[[
Once these steps have started, the server must not send any further data  
to the server. The 0xFF 0x00 bytes indicate the end of the server's data,  
and further bytes will be discarded by the client.
]]

s/to the server/to the client/

-- 
Simon Pieters
Opera Software
Received on Friday, 30 April 2010 05:07:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:22 UTC