TsgcWSAPIServer_WebPush › Methods › BroadcastNotification
Sends the same notification to every subscription currently held in the internal Subscriptions list.
public void BroadcastNotification(TsgcWebPushMessage aMessage);
| Name | Type | Description |
|---|---|---|
aMessage | const TsgcWebPushMessage | Structured notification (Title/Body/Icon/Url) serialized once via AsJSON and reused for each subscription. |
Iterates the thread-safe Subscriptions list under a lock and calls SendNotification for each entry. If a send fails, OnWebPushSendNotificationException fires and, when Remove is returned True (the default), the subscription is automatically dropped from the list — ideal for cleaning up 404/410 responses from the push service.
public void BroadcastNotification(string aMessage);
| Name | Type | Description |
|---|---|---|
aMessage | const string | Raw payload (usually JSON) delivered verbatim to every subscriber after per-subscription encryption. |
Convenience overload when the broadcast payload is already serialized. You can add or remove subscriptions manually through Subscriptions.AddSubscription/Subscriptions.RemoveSubscription if you manage persistence yourself.