workloads / main / BroadcastPublisher
Class: BroadcastPublisher<C>
Publisher. Handles connection management, authentication, and provides an interface for publishing events.
Type Parameters
Type Parameter |
---|
|
Constructors
new BroadcastPublisher()
ts
new BroadcastPublisher<C>(): BroadcastPublisher<C>
Returns
Methods
connect()
ts
connect(): Promise<void>
Establishes a connection to the AWS AppSync Events WebSocket API.
Returns
Promise
<void
>
A Promise that resolves when the connection is successfully established.
disconnect()
ts
disconnect(): void
Disconnects from the AWS AppSync Events WebSocket API.
Returns
void
publishTo()
ts
publishTo<T>(
channelName,
params,
data): Promise<boolean>
Type Parameters
Type Parameter |
---|
|
Parameters
Parameter | Type |
---|---|
|
|
|
|
|
|
Returns
Promise
<boolean
>