Sorry, I had to run off a bit to get in some study time.

Looks like I was close to you first snippet, but not close enough. Anyway, while it does seem to work as intended, my own code is failing elsewhere. I think I'll just wait for the next version of the protocol...

Anyway, it's not an HTTP protocol issue. WebSockets are a proposed spec for HTML5 to get rid of the typical polling systems used. It initiates a TCP connection and sends GET headers (as a complete HTTP GET request), to which you basically have to pack 2 keys, and concat them with the third key and send it back for "authentication", to which afterward it acts just like TCP. WebSockets isn't a protocol, but TCP with this required handshake on connect.

Send it incomplete information, the connection stalls while waiting. Send it complete, but wrong information and the socket is terminated. (I am at this last stage here, of it not liking what I'm sending back and suiciding)

I'll probably setup my own Pas client to verify the data is correct... with WebSockets you aren't notified about the connection process. On receive events are not triggered in your code until the handshake has been completed.