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

Function socketStream

packages/platform/node-shared/benchmark/Socket.ts:276–279  ·  view source on GitHub ↗
(client: SocketClient)

Source from the content-addressed store, hash-verified

274}
275
276const socketStream = (client: SocketClient) => {
277 const effect = Effect.flatMap(client.write(request), () => client.read(streamBytes))
278 return () => Effect.runPromise(effect)
279}
280
281const socketPingPong = (client: SocketClient) => {
282 // A plain counter loop rather than `Effect.repeat`, whose Schedule reads the

Callers 1

Socket.tsFile · 0.85

Calls 2

writeMethod · 0.65
readMethod · 0.65

Tested by

no test coverage detected