2.3.4 配置差异
io.set 不见了
const socket= require('socket.io')({
// 这里是选项
})设置资源路径
const socket= io.connect('localhost:3000',{
resource:"path/to/socket.io";
})const socket= io.connect('localhost:3000',{
path:'/path/to/socket.io';
})Last updated
Was this helpful?