core.reconnectingwebsocket.close
Home > @medplum/core > ReconnectingWebSocket > close
ReconnectingWebSocket.close() method
Closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing
Signature:
close(code?: number, reason?: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
code | number | (Optional) The code to close with. Default is 1000. |
reason | string | (Optional) An optional reason for closing the connection. |
Returns:
void