Problem connecting through JS, but not telnet
I get the following when connecting through Javascript. Am I supposed to handle the Websocket negotiation myself?

`WebSocket connection to 'ws://localhost:8080/' failed: WebSocket opening handshake timed out`

```
/var/www/instaballot/bin (staging) > php chat-server.php 
New connection! (28)
Connection 28 sending message "GET / HTTP/1.1
Host: localhost:8080
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: http://127.0.0.1
Sec-WebSocket-Version: 13
DNT: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
Sec-WebSocket-Key: 7Bb+2RDnFjQXd6TxQd/Hog==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

" to 0 other connections
```
