Home > eth-connect > IWebSocket
Signature:
export interface IWebSocket
Property | Modifiers | Type | Description |
---|---|---|---|
onclose | ((this: this, ev: any) => any) | null | ||
onerror | ((this: this, ev: any) => any) | null | ||
onmessage | ((this: this, ev: any) => any) | null | ||
onopen | ((this: this, ev: any) => any) | null |
Method | Description |
---|---|
close(code, reason) | Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason. |
send(data) | Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView. |