node.js - socket.io try to listen to default apache port -
in node.js script, set socket.io listen on port 8080:
client = require('socket.io').listen(8080).sockets);
then can connect io.connect('http://.../8080')
.
but why, in firefox/chrome consoles, see multiple requests on port 80? these :
get http://.../socket.io/?eio=2&transport=polling&t=1408319587655-58 http://.../socket.io/?eio=2&transport=polling&t=1408319592695-59 http://.../socket.io/?eio=2&transport=polling&t=1408319597750-60
those links working port 8080.
shouldn't io.connect('http://...:8080')
, not io.connect('http://.../8080')
?
Comments
Post a Comment