core.reconnectingwebsocket.close | Medplum
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 [](/content/docs/sdk/core.reconnectingwebsocket.close#parameters "Direct link to Parameters"/index.html)
| 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