事件'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)
}
}
感谢。