Documents for @litert/websocket / Client / IWsConnectOptionsBase
Interface: IWsConnectOptionsBase
Defined in: src/lib/Client.ts:189
The connection options for WebSocket client.
Extended by
Properties
connectTimeout?
optionalconnectTimeout:number
Defined in: src/lib/Client.ts:196
The timeout for connecting to the server.
See
cL.DEFAULT_CONNECT_TIMEOUT
forceNewConnection?
optionalforceNewConnection:boolean
Defined in: src/lib/Client.ts:229
Whether to force a new connection.
In some case, the underlying HTTP/HTTPS agent may reuse an existing connection in the connection pool. This may cause some issues like CONN_RESET during the handshake. If you meet such issues, set this option to
trueto force a new connection.
Default
trueframeReceiveMode?
optionalframeReceiveMode:EFrameReceiveMode
Defined in: src/lib/Client.ts:203
The mode of receiving frames.
See
cL.EFrameReceiveMode.STANDARD
maxMessageSize?
optionalmaxMessageSize:number
Defined in: src/lib/Client.ts:210
The maximum size of each message.
See
cL.DEFAULT_MAX_MESSAGE_SIZE
wsHandshakeOpts?
optionalwsHandshakeOpts:IClientHandshakeOptions
Defined in: src/lib/Client.ts:217
The options for the handshake.
Default
{}