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

Function layerWebSocket

packages/effect/src/graphql/GraphQLProtocol.ts:1066–1076  ·  view source on GitHub ↗
(
  options: {
    readonly url: string
    readonly headers?: Headers.Input | undefined
    readonly connectionParams?: Effect.Effect<Record<string, unknown> | undefined, unknown, R> | undefined
    readonly connectionAckTimeout?: Duration.Input | undefined
    readonly keepAlive?: Duration.Input | false | undefined
    readonly idleTimeout?: Duration.Input | undefined
  }
)

Source from the content-addressed store, hash-verified

1064 * @since 4.0.0
1065 */
1066export const layerWebSocket = <R = never>(
1067 options: {
1068 readonly url: string
1069 readonly headers?: Headers.Input | undefined
1070 readonly connectionParams?: Effect.Effect<Record<string, unknown> | undefined, unknown, R> | undefined
1071 readonly connectionAckTimeout?: Duration.Input | undefined
1072 readonly keepAlive?: Duration.Input | false | undefined
1073 readonly idleTimeout?: Duration.Input | undefined
1074 }
1075): Layer.Layer<GraphQLProtocol, never, Socket.WebSocketConstructor | R> =>
1076 Layer.effect(GraphQLProtocol, makeWebSocket(options))

Callers

nothing calls this directly

Calls 1

makeWebSocketFunction · 0.70

Tested by

no test coverage detected