Skip to main content

Type Alias: GatewayWebSocketFactory

type GatewayWebSocketFactory = (url, options) => GatewayWebSocket;

Defined in: src/http/realtime.ts:40

Explicit caller-owned transport, compatible with Node's ws package; never a browser credential workaround.

Parameters​

ParameterType
urlstring
options{ headers: Record<string, string>; handshakeTimeout: number; followRedirects: false; perMessageDeflate: false; maxPayload: number; }
options.headersRecord<string, string>
options.handshakeTimeoutnumber
options.followRedirectsfalse
options.perMessageDeflatefalse
options.maxPayloadnumber

Returns​

GatewayWebSocket

Example​

`const factory: GatewayWebSocketFactory = (url, options) => new WebSocket(url, options);`