Class: EventChannel
Defined in: packages/core/src/events/events.ts:39
Per-attachment async event channel. Firebird gives a connection exactly one async aux port; every subscription flows over it and is demultiplexed by request id (rid). Created lazily on the first subscription and torn down when the last one closes.
Constructors
Constructor
ts
new EventChannel(att, auxHost): EventChannel;Defined in: packages/core/src/events/events.ts:47
Parameters
| Parameter | Type |
|---|---|
att | Attachment |
auxHost | string |
Returns
EventChannel
Methods
closeAll()
ts
closeAll(reason?): void;Defined in: packages/core/src/events/events.ts:150
Force-close the whole channel (used on attachment disconnect/reconnect).
Parameters
| Parameter | Type |
|---|---|
reason? | Error |
Returns
void
subscribe()
ts
subscribe(names): Promise<EventListener>;Defined in: packages/core/src/events/events.ts:71
Subscribe to a set of events; returns a started listener.
Parameters
| Parameter | Type |
|---|---|
names | string[] |
Returns
Promise<EventListener>