core.fhircastconnection
Home > @medplum/core > FhircastConnection
FhircastConnection class
A class representing a FHIRcast
connection.
FhircastConnection
extends EventTarget
and emits 3 lifecycle events: 1. connect
- An event to signal when a WebSocket connection has been opened. Fired as soon as a WebSocket emits open
. 2. message
- Contains a payload
field containing a FHIRcast
message payload exactly as it comes in over WebSockets. 3. disconnect
- An event to signal when a WebSocket connection has been closed. Fired as soon as a WebSocket emits close
.
To close the connection, call connection.disconnect()
and listen to the disconnect
event to know when the connection has been disconnected.
Signature:
export declare class FhircastConnection extends TypedEventTarget<FhircastSubscriptionEventMap>
Extends: TypedEventTarget<FhircastSubscriptionEventMap>
Constructors
Constructor | Modifiers | Description |
---|---|---|
Creates a new |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
Methods
Method | Modifiers | Description |
---|---|---|