0
I am not able to make the connection with server.
Obs: the browser supports websocket.
I’m doing it this way
var socket = new WebSocket('sw: localhost:8080');
Any suggestions?
0
I am not able to make the connection with server.
Obs: the browser supports websocket.
I’m doing it this way
var socket = new WebSocket('sw: localhost:8080');
Any suggestions?
2
In a brief reply, you probably forgot the //
and you changed the ws
for sw
, I believe that the right thing should be:
var socket = new WebSocket('ws://localhost:8080');
0
Check the port that is configured on the server for Websocket, the 8080 port is usually used for HTTP and Websocket uses another port. Find the correct port and switch to the Webscoket constructor in javascript.
Browser other questions tagged html5 websocket
You are not signed in. Login or sign up in order to post.
Any error message? if possible post more details.
– stderr
Yes. Firefox says it was not possible to establish the connection and IE reports Websocket Error: Incorrect HTTP Response. Status code 200, OK. I’m using WAMP and Apache is running on port 8080. You think the connection should be directed to a php server?
– Ivan
how you set up your socket server ?
– Fábio Lemos Elizandro
you should take a look in this plugin
– Fábio Lemos Elizandro