API reference / @evolu/common / WebSocket / WebSocketOptions
Interface: WebSocketOptions
Defined in: packages/common/src/WebSocket.ts:47
Options for creating WebSocket
Properties
Property | Modifier | Type | Description | Defined in |
---|---|---|---|---|
binaryType? | public | "blob" | "arraybuffer" | Sets the binary type for the data being received. | packages/common/src/WebSocket.ts:52 |
onClose? | public | (event ) => void | Callback when the connection is closed. | packages/common/src/WebSocket.ts:61 |
onError? | public | (error ) => void | Callback when an error occurs. | packages/common/src/WebSocket.ts:58 |
onMessage? | public | (data ) => void | Callback when message data is received. | packages/common/src/WebSocket.ts:64 |
onOpen? | public | () => void | Callback when the connection is established. | packages/common/src/WebSocket.ts:55 |
protocols? | public | string | string [] | Protocol(s) to use with the WebSocket connection. | packages/common/src/WebSocket.ts:49 |
retryOptions? | public | Omit <RetryOptions <WebSocketRetryError >, "signal" > | Options for retry behavior. | packages/common/src/WebSocket.ts:67 |
WebSocketConstructor? | public | { (url , protocols? ): WebSocket ; CLOSED : 3 ; CLOSING : 2 ; CONNECTING : 0 ; OPEN : 1 ; prototype : WebSocket ; } | For custom WebSocket implementations. This suppors blob: https://github.com/callstackincubator/react-native-fast-io | packages/common/src/WebSocket.ts:76 |
WebSocketConstructor.CLOSED | readonly | 3 | - | node_modules/typescript/lib/lib.dom.d.ts:26778 |
WebSocketConstructor.CLOSING | readonly | 2 | - | node_modules/typescript/lib/lib.dom.d.ts:26777 |
WebSocketConstructor.CONNECTING | readonly | 0 | - | node_modules/typescript/lib/lib.dom.d.ts:26775 |
WebSocketConstructor.OPEN | readonly | 1 | - | node_modules/typescript/lib/lib.dom.d.ts:26776 |
WebSocketConstructor.prototype | public | WebSocket | - | node_modules/typescript/lib/lib.dom.d.ts:26773 |