Skip to content

Documents for @litert/websocket / Client / wsConnect

Function: wsConnect() ​

wsConnect(opts): Promise<IClient>

Defined in: src/lib/Client.ts:285

Establish a WebSocket connection to a server via plain HTTP.

Parameters ​

opts ​

IWsConnectOptions

The options for the connection.

Returns ​

Promise<IClient>

The promise of the WebSocket client.

Deprecated ​

Use createClient method instead, because the client can not process early data sent by server correctly if you use this method. And this method will be removed in the future.