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

Function toStream

packages/effect/src/socket/Socket.ts:737–740  ·  view source on GitHub ↗
(self: Socket)

Source from the content-addressed store, hash-verified

735 * @since 4.0.0
736 */
737export const toStream = (self: Socket): Stream.Stream<Uint8Array, SocketError> =>
738 Stream.fromChannel(
739 Channel.fromTransform((_, scope) => Scope.provide(readerBytes(self), scope))
740 )
741
742/**
743 * Creates a binary socket `Channel` from the `Socket` service in the

Callers 1

AtomRegistry.tsFile · 0.50

Calls 2

readerBytesFunction · 0.85
provideMethod · 0.45

Tested by

no test coverage detected