简体   繁体   中英

socket.io try to listen to default apache port

In my Node.js script, I set socket.io to listen on port 8080:

client = require('socket.io').listen(8080).sockets);

Then I can connect with io.connect('http://.../8080') .

But why, in the firefox/chrome consoles, I see multiple GET requests on port 80? Like these :

GET http://.../socket.io/?EIO=2&transport=polling&t=1408319587655-58
GET http://.../socket.io/?EIO=2&transport=polling&t=1408319592695-59
GET http://.../socket.io/?EIO=2&transport=polling&t=1408319597750-60

Those links are working with port 8080.

不是io.connect('http://...:8080')而不是io.connect('http://.../8080')吗?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM