I'm working my way through this, the first error causing the disconnection has to do with the initial handshake:
I've modified the file wm_server/includes/classes/Server/WebSocketHandshake.class.inc (constructor)
$resource = $host = $upgrade = $connection = $origin = $key = $protocol = $version = $code = $handshake = null;
preg_match('#GET (.*?) HTTP#', $buffer, $match) && $resource = $match[1];
preg_match("#Host: (.*?)\r\n#", $buffer, $match) && $host = $match[1];
preg_match("#Upgrade: (.*?)\r\n#", $buffer, $match) && $upgrade = $match[1];
preg_match("#Connection: (.*?)\r\n#", $buffer, $match) && $connection = $match[1];
preg_match("#Sec-WebSocket-Key: (.*?)\r\n#", $buffer, $match) && $key = $match[1];
preg_match("#Sec_Websocket_Origin: (.*?)\r\n#", $buffer, $match) && $origin = $match[1];
preg_match("#Sec_WebSocket_Protocol: (.*?)\r\n#", $buffer, $match) && $protocol = $match[1];
preg_match("#Sec_WebSocket_Version: (.*?)\r\n#", $buffer, $match) && $version = $match[1];
$GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
$ConcatKey = $key.$GUID;
$SHA1 = sha1($ConcatKey,TRUE);
$accept = base64_encode($SHA1);
$this->__value__ =
"HTTP/1.1 101 Switching Protocols\r\n" .
"Upgrade: WebSocket\r\n" .
"Connection: Upgrade\r\n" .
"Sec-WebSocket-Accept: {$accept}\r\n" ;
This removes the handshake error that Chrome is reporting, still hasn't fixed all the problems (isn't changing "PhudBase Connection" to connected in the client and getting a DOM exception 11 error when I attempt to connect). Will post updates if/when I get somewhere.