WebSocket: { CLOSED: 3; CLOSING: 2; CONNECTING: 0; OPEN: 1; prototype: WebSocket; new (url: string | URL, protocols?: string | string[]): WebSocket;} Type declaration
- new (url: string | URL, protocols?: string | string[]): WebSocket
Parameters
- url: string | URL
Optional
protocols: string | string[]
Readonly
CLOSED: 3
Readonly
CLOSING: 2
Readonly
CONNECTING: 0
Readonly
OPEN: 1