Breaking out discussion of how the WebSocket protocol will be implemented from https://bugs.webkit.org/show_bug.cgi?id=27209 ap@webkit.org mentioned: """ The most interesting aspect of WebSockets implementation, and one that I didn't see discussed yet, is what kind of back-end we need. It is not clear whether existing HTTP back-ends for supported platforms allow for the level of control needed for Web Sockets - it is possible that we'll actually need a new cross-platform HTTP implementation for these. """
To support Web Sockets implementation, we'll need raw stream socket (and proxy support and TLS/SSL socket) back-end. Web Sockets uses similar request/response message with HTTP, but it is more strict than HTTP and not so difficult to implement it on top of raw socket. I think it would be not so easy to use existing HTTP back-ends for Web Sockets, because existing HTTP back-ends would do a lot of things than Web Sockets spec says and would not allow for the the control that required for Web Sockets frame handling. I'm implementing Web Sockets on WebKit/Gtk with using g_io_channel functions, although I'm not addressed on proxy, TLS/SSL, authentication and cookies in Web Sockets.
I believe WebSocket protocol was already implemented in WebCore.