TsgcWSPClient_Dataset › Methods › Publish
Publishes a message to all clients subscribed to a channel.
procedure Publish(const aText, aChannel: String; const aGuid: String = ''; const aQueue: TwsQueue = queueLevel0);
| Name | Type | Description |
|---|---|---|
aText | const String | Payload to publish. |
aChannel | const String | Channel the message is published on; only clients subscribed to this channel receive it. |
aGuid | const String | Optional Guid of the target server-side Dataset protocol instance. Leave empty to use the default. |
aQueue | const TwsQueue | Queue level used when the server applies transactional queuing to the publication. |
Delivers the payload to every connected client subscribed to the channel through their OnEvent handler. When QoS is set to Level 1 or 2, the message is assigned an Id and the server acknowledges delivery through OnAcknowledgment.
oProtocol.Publish('breaking news', 'news');