From f69ac8e0a01d54ab8d1741e1b05d4888e7a6b63b Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 6 Oct 2011 10:56:36 -0500 Subject: Clarify protocol/binary issues. --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4dff117..75a2d47 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,18 @@ websockify was formerly named wsproxy and was part of the [noVNC](https://github.com/kanaka/noVNC) project. At the most basic level, websockify just translates WebSockets traffic -to normal socket traffic. websockify accepts the WebSockets handshake, +to normal socket traffic. Websockify accepts the WebSockets handshake, parses it, and then begins forwarding traffic between the client and -the target in both directions. WebSockets payload data is UTF-8 -encoded so in order to transport binary data it must use an encoding -that can be encapsulated within UTF-8. websockify uses base64 to encode -all traffic to and from the client. Also, WebSockets traffic starts -with '\0' (0) and ends with '\xff' (255). Some buffering is done in -case the data from the client is not a full WebSockets frame (i.e. -does not end in 255). +the target in both directions. +### WebSockets binary data + +Websockify supports all versions of the WebSockets protocol (Hixie and +HyBI). The older Hixie versions of the protocol only support UTF-8 +text payloads. In order to transport binary data over UTF-8 an +encoding must used to encapsulate the data within UTF-8. Websockify +uses base64 to encode all traffic to and from the client. This does +not affect the data between websockify and the server. ### Websock Javascript library @@ -168,7 +170,7 @@ implementations: yes yes - IETF/HyBi 07-10 + IETF/HyBi (07+) yes no no @@ -193,6 +195,7 @@ Protocol draft/specification links: * [Hixie 76](http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76) * [IETF/HyBi 07](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07) * [IETF/HyBi 10](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10) +* [IETF/HyBi 17](http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17) ### Wrap a Program -- cgit v1.2.1