core.reconnectingwebsocket
Home > @medplum/core > ReconnectingWebSocket
ReconnectingWebSocket class
Signature:
export declare class ReconnectingWebSocket<WS extends IWebSocket = WebSocket> extends TypedEventTarget<WebSocketEventMap> implements IReconnectingWebSocket
Extends: TypedEventTarget<WebSocketEventMap>
Implements: IReconnectingWebSocket
Constructors
Constructor | Modifiers | Description |
---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
| Options<WS> | ||
| (Optional) | ||
| string | ||
WS['binaryType'] | |||
| number | ||
| number | ||
| number | ||
| number | ||
| number | ||
| number | ||
| number | ||
| string | ||
((event: CloseEvent) => void) | null | An event listener to be called when the WebSocket connection's readyState changes to CLOSED | ||
((event: ErrorEvent) => void) | null | An event listener to be called when an error occurs | ||
((event: MessageEvent) => void) | null | An event listener to be called when a message is received from the server | ||
((event: Event) => void) | null | An event listener to be called when the WebSocket connection's readyState changes to OPEN; this indicates that the connection is ready to send and receive data | ||
| number | ||
| number | ||
| string | ||
| number | ||
| number | ||
| boolean | ||
| string |
Methods
Method | Modifiers | Description |
---|---|---|
Closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing | ||
Closes the WebSocket connection or connection attempt and connects again. Resets retry counter; | ||
Enqueue specified data to be transmitted to the server over the WebSocket connection |