Interface: WebSocketLike
The portable portion of a WebSocket connection exposed by this SDK.
Node.js ws instances and browser-native WebSocket instances both satisfy this interface. Runtime-specific extensions remain available through wsOptions, without making consumers install Node.js or ws declarations.
Properties
Methods
close()
ts
close(code?: number, reason?: string): void;Parameters
| Parameter | Type |
|---|---|
code? | number |
reason? | string |
Returns
void
send()
ts
send(data: any): void;Runtime implementations accept their own wider binary-data variants.
Parameters
| Parameter | Type |
|---|---|
data | any |
Returns
void