core.fhircastconnection | Medplum
FhircastConnection class
A class representing a FHIRcast connection.
FhircastConnection extends EventTarget and emits 3 lifecycle events:
connect- An event to signal when a WebSocket connection has been opened. Fired as soon as a WebSocket emitsopen.message- Contains apayloadfield containing aFHIRcastmessage payload exactly as it comes in over WebSockets.disconnect- An event to signal when a WebSocket connection has been closed. Fired as soon as a WebSocket emitsclose.
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 |
|---|---|---|
| (constructor)(subRequest) | Creates a new FhircastConnection. |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| subRequest | readonly |
SubscriptionRequest |
Methods
| Method | Modifiers | Description |
|---|---|---|
| disconnect() |