June 2011 Archives

The WebSocket protocol - Draft, HyBi 09

| 0 Comments
Due to client demand we're working on the WebSocket protocol again. Things have moved on since the work we did in December and this time the resulting option pack really will make it into the next release rather than simply being something that we tweak for each client that asks for it.

Back in December one of our gaming clients wanted WebSocket functionality in their game server so we did some work on the two versions of the spec that they wanted, the Hixie 76 draft and the HyBi 03 draft. The protocol has since gone through some changes and is now looking to be stabilising once again with the HyBi 09 draft.

The new version of the protocol still has a few outstanding questions though, such as whether the existing design of the deflate-stream extension is actually worth having in the presence of frame data masking, see here... So we expect that there will be several more revisions of our implementation as the standard solidifies and our client's usage patterns emerge.
To enable network applications to send and receive data via a TCP connection reliably and efficiently the TCP protocol includes flow control which allows the TCP stack on one side of the connection to tell the TCP stack on other side of the connection to slow down its data transmission, or to stop sending data entirely. The reason that this is required is that the TCP stack in each peer contains buffers for data transmission and data reception and flow control is required to prevent a sender from sending when a receiver's buffer is full. The flow control is accomplished by adjusting the window size of the sliding window acknowledgment system that is used by TCP.