Skip to content
// EFFECT DAYS 2026

NodeWS unstable

Re-exports the ws package and provides a WebSocket client layer backed by it. NodeSocket clients use Node's global WebSocket and do not load ws.

1 exports Since v4.1.0 Source

Layers

Provides a Socket.WebSocketConstructor backed by the ws package.

Details

Supports handshake headers alongside subprotocols, and pauses reads once buffered frames reach the Socket.fromWebSocket highWaterMark (64 KiB by default).

Signature

declare const layerWebSocketConstructor: Layer.Layer<Socket.WebSocketConstructor>