After installing node.js, I went after this tutorial to start a simple chat server. It was very easy to configure and work, but I noticed two problems:
1.) I get this warning from socket.io
info - socket.io started debug - served static /socket.io.js debug - client authorized info - handshake authorized 1385647068766475337 debug - setting request GET /socket.io/1/websocket/1385647068766475337 debug - set heartbeat interval for client 1385647068766475337 warn - websocket connection invalid
This makes no sense to me because I did not touch anything with socket.io and I use the latest version of chrome (23), which I know supports websockets (I can successfully connect to them using PHP-WebSockets). It still uses XHR, but I'm really interested in working with Websocket functionality.
2.) When I switch to localhost: 8080 to connect to the chat server, it takes about 7-8 seconds for it to ask me for my name and actually connect me to the server. I have a feeling that this could happen because he is returning to XHR, but I really know little about it, so I canβt say it. Any thoughts?
source share