I am trying to do a tutorial on websockets, however it seems I can't even connect to the websocket.
I am using wamp 2.5 and I have php_sockets extension enabled.
In the video, the guy's url for the homepage is: youtube:app:8000
, and mine is l/chat
(I turned localhost into l a while ago), and it opens up normally.
Then, he sets up the server like so:
var socket = new WebSocket("ws://127.0.0.1:2000");
And since it's just the first step with no more code, when he goes to the homepage (youtube:app:8000) he gets this message in chrome:
Error during websocket handshake
Whereas I get:
Error in connection establishment
When setting my new websocket, I tried all 3 following options, but the error is always the same (I never get to the handshake).
var socket = new WebSocket("ws://l:2000");
var socket = new WebSocket("ws://localhost:2000");
var socket = new WebSocket("ws://127.0.0.1:2000");
What can be the problem?