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

Function toChannel

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

Source from the content-addressed store, hash-verified

657 * @since 4.0.0
658 */
659export const toChannel = <IE = never>(
660 self: Socket
661): Channel.Channel<
662 NonEmptyReadonlyArray<Uint8Array>,
663 SocketError | IE,
664 void,
665 NonEmptyReadonlyArray<Uint8Array | string | CloseEvent>,
666 IE
667> => toChannelWithReader<Uint8Array, IE>(self, readerBytes(self))
668
669/**
670 * Converts a `Socket` into a bidirectional string `Channel`, decoding binary

Callers 1

toChannelWithFunction · 0.70

Calls 2

toChannelWithReaderFunction · 0.85
readerBytesFunction · 0.85

Tested by

no test coverage detected