
如上图配置之后,没有成功
客户端情况


According to the official document, there are two ways to set the server path:
/socket.io) which means the init config in egg-socket.io:exports.io = {
init: {
path: 'geoc',
},
namespace: {
'/': {
connectionMiddleware: [],
packetMiddleware: [],
},
},
};
app.io.path('geoc')
@ngot 感谢!已经成功。查阅同学请注意:path:"/geoc",“/”不能少。
Most helpful comment
According to the official document, there are two ways to set the server path:
/socket.io) which means the init config in egg-socket.io: