如何中止socket.io发出动作或清理发出list.thanks

时间:2017-02-02 03:34:19

标签: javascript node.js sockets socket.io

事件'progress'将发出缓冲区(大文件缓冲区)。当某些条件我要取消或中止发出时,socket无法关闭。

socket.io将发出所有事件。

let io = socket.listen(server, { log: false, origins: '*:*' })
io.on('connection', (client) => {
 client.on('progress', (body) => {
    //body have file block buffer from other client,i want push buffer to third client.When certain conditions want to cancel or abort emit.
    io.to('jim-room').emit('/api/v1/client/done', body)
 }
}

感谢。

0 个答案:

没有答案