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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -