Variable: WebSocket
ts
WebSocket: {
(url, protocols?): WebSocket;
CLOSED: 3;
CLOSING: 2;
CONNECTING: 0;
OPEN: 1;
prototype: WebSocket;
};Defined in: types/desktop-engine.d.ts:4116
Type Declaration
Connects to a ws(s) (or http(s)) URL. Throws a "SyntaxError" DOMException for a bad URL or subprotocols and a "SecurityError" one without the network permission; connection failures are error + close events instead
Parameters
| Parameter | Type |
|---|---|
url | | string | URL | { toString: string; } |
protocols? | string | string[] |
Returns
| Name | Type | Defined in |
|---|---|---|
CLOSED | 3 | types/desktop-engine.d.ts:4151 |
CLOSING | 2 | types/desktop-engine.d.ts:4150 |
CONNECTING | 0 | types/desktop-engine.d.ts:4148 |
OPEN | 1 | types/desktop-engine.d.ts:4149 |
prototype | WebSocket | types/desktop-engine.d.ts:4142 |
