/** * Bun platform socket entry point for Effect sockets. * * This module re-exports the shared Node socket constructors for TCP clients, * Unix domain socket clients, and adapters from existing Node `Duplex` streams. * It also provides Bun WebSocket layers using `globalThis.WebSocket`, including * a constructor layer and a `Socket.Socket` layer for a WebSocket URL. * * @stability unstable * @since 4.0.0 */ import type * as Duration from "effect/Duration"; import type { Effect } from "effect/Effect"; import * as Layer from "effect/Layer"; import * as Socket from "effect/socket/Socket"; /** * @since 4.0.0 */ export * from "@effect/platform-node-shared/NodeSocket"; /** * Provides a `Socket.WebSocketConstructor` backed by Bun's global * `WebSocket` implementation, supporting handshake headers and subprotocols * together in client options objects. * * @stability unstable * @category layers * @since 4.0.0 */ export declare const layerWebSocketConstructor: Layer.Layer; /** * Creates a `Socket.Socket` layer for a WebSocket URL using Bun's global * `WebSocket` constructor, honoring protocol, handshake-header, open-timeout, and * high-water-mark options. * * @stability unstable * @category layers * @since 4.0.0 */ export declare const layerWebSocket: (url: string | Effect, options?: { readonly openTimeout?: Duration.Input | undefined; readonly protocols?: string | Array | undefined; readonly headers?: Readonly> | undefined; readonly highWaterMark?: number | undefined; } | undefined) => Layer.Layer; //# sourceMappingURL=BunSocket.d.ts.map