Core
withWebSocketHandle
Replaces the WebSocket constructor used for socket connections.
@defjs/core · Function
Signature
function withWebSocketHandle( WebSocketImpl: WebSocketHandleConstructor, ): ClientOption;
The default is globalThis.WebSocket. WebSocketImpl is a WebSocketHandleConstructor that returns a WebSocketHandle. If no constructor is available, a WebSocket operation fails with an ENV_UNSUPPORTED fault.
Parameters
Prop
Type
WebSocketImpl WebSocketHandleConstructorConstructor that returns a WebSocketHandle.
Returns
An option that sets config.webSocket.handle.