MCPcopy Index your code
hub / github.com/Effect-TS/effect / fromWebSocket

Function fromWebSocket

packages/experimental/src/EventLogRemote.ts:428–439  ·  view source on GitHub ↗
(
  url: string,
  options?: {
    readonly disablePing?: boolean
  }
)

Source from the content-addressed store, hash-verified

426 * @category construtors
427 */
428export const fromWebSocket = (
429 url: string,
430 options?: {
431 readonly disablePing?: boolean
432 }
433): Effect.Effect<void, never, Scope.Scope | EventLogEncryption | EventLog | Socket.WebSocketConstructor> =>
434 Effect.gen(function*() {
435 const socket = yield* Socket.makeWebSocket(url)
436 return yield* fromSocket(options).pipe(
437 Effect.provideService(Socket.Socket, socket)
438 )
439 })
440
441/**
442 * @since 1.0.0

Callers 1

layerWebSocketFunction · 0.70

Calls 2

fromSocketFunction · 0.85
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…