MCPcopy Create free account
hub / github.com/honojs/node-server / sendChunk

Function sendChunk

test/server-socket.test.ts:298–305  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

296 const totalSize = 1024 * 1024
297 let offset = 0
298 const sendChunk = () => {
299 if (offset >= totalSize) {
300 return
301 }
302 req.write(Buffer.alloc(Math.min(chunkSize, totalSize - offset)))
303 offset += chunkSize
304 sendTimer = setTimeout(sendChunk, 5)
305 }
306 sendChunk()
307
308 await Promise.all([reqPromise, resPromise])

Callers 1

runnerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…