MCPcopy Create free account
hub / github.com/Effect-TS/effect / takeBuffer

Function takeBuffer

packages/effect/src/socket/Socket.ts:1023–1029  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1021 }
1022
1023 function takeBuffer(): NonEmptyReadonlyArray<Uint8Array | string> {
1024 const chunk = buffer
1025 buffer = []
1026 bufferSize = 0
1027 if (error === undefined) resumeWebSocket()
1028 return chunk as unknown as NonEmptyReadonlyArray<Uint8Array | string>
1029 }
1030
1031 function deliver() {
1032 if (waiter === undefined || buffer.length === 0) return

Callers 6

deliverMethod · 0.85
failMethod · 0.85
upgradeMethod · 0.85
deliverFunction · 0.85
failFunction · 0.85
fromWebSocketFunction · 0.85

Calls 1

resumeWebSocketFunction · 0.85

Tested by

no test coverage detected