DEBUG
This commit is contained in:
parent
93c2d2fef9
commit
c461a69cd9
@ -10,6 +10,7 @@ webrtc 实现的 p2p 信道
|
||||
- [x] 响应列表时不再广播
|
||||
- [x] 对方退出时清除其列表
|
||||
- [ ] 分片请求时立即播放
|
||||
- [ ] 上锁防止连续重复加载同一个造成分片混乱
|
||||
- [ ] 集群分发
|
||||
- [ ] 下载加速
|
||||
- [ ] 即时通讯
|
||||
|
@ -167,9 +167,7 @@ export default class ClientList {
|
||||
while (ch.readyState !== 'open') {
|
||||
await new Promise(resolve => setTimeout(resolve, 100))
|
||||
}
|
||||
console.log(ch.label, '通道已经打开, 开始发送数据')
|
||||
const rest = ch.send(data)
|
||||
console.log(ch.label, '通道发送已结束', rest)
|
||||
ch.send(data)
|
||||
})
|
||||
}
|
||||
// 通过指定通道发送数据(广播)
|
||||
|
@ -196,6 +196,12 @@
|
||||
return
|
||||
}
|
||||
console.log('未知类型:', type)
|
||||
},
|
||||
onclose: event => {
|
||||
console.log('关闭信道', event.target.label)
|
||||
},
|
||||
onerror: error => {
|
||||
console.log('信道错误', error)
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user