3.1.6 初始化示例-查询选项
const socket=io({
query:{
token:"code"
}
})
重新连接时也可以更新查询内容:
socket.on('reconnect_attempt',()=>{
socket.io.opts.query={
token:"fgh"
}
})
Last updated
Was this helpful?
const socket=io({
query:{
token:"code"
}
})
重新连接时也可以更新查询内容:
socket.on('reconnect_attempt',()=>{
socket.io.opts.query={
token:"fgh"
}
})
Last updated
Was this helpful?