4.1.6 服务器路径值 server_path_value
value
(string)Returns
Server|String
设置为Engine.io
和静态文件提供服务的路径value
。默认为/socket.io
。如果没有提供参数,此方法将返回当前值。
const io= require('socket.io')();
io.path('/myownpath');
// 客户端
const socket=io({
path:"/myownpath"
})
Last updated
Was this helpful?