简体   繁体   English

socket.io尝试监听默认的Apache端口

[英]socket.io try to listen to default apache port

In my Node.js script, I set socket.io to listen on port 8080: 在我的Node.js脚本中,我将socket.io设置为侦听端口8080:

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

Then I can connect with io.connect('http://.../8080') . 然后,我可以连接io.connect('http://.../8080')

But why, in the firefox/chrome consoles, I see multiple GET requests on port 80? 但是,为什么在firefox / chrome控制台中,在端口80上看到多个GET请求? 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. 这些链接正在使用端口8080。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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