降低延迟

This commit is contained in:
2023-10-03 00:17:03 +08:00
parent 380878667b
commit b4aef2a89f
2 changed files with 5 additions and 4 deletions

View File

@@ -17,9 +17,9 @@
import ClientList from './client.js'
// 缓冲分片发送
const CHUNK_SIZE = 1024 * 64 // 每个块的大小为128KB
const THRESHOLD = 1024 * 1024 // 缓冲区的阈值为1MB
const DELAY = 100 // 延迟500ms
const CHUNK_SIZE = 1024 * 64 // 默认每个块的大小为128KB
const THRESHOLD = 1024 * 1024 // 默认缓冲区的阈值为1MB
const DELAY = 50 // 默认延迟500ms
// 将两个ArrayBuffer合并成一个
function appendBuffer(buffer1, buffer2) {