TsgcWSPClient_Presence › Methods › Publish
Publishes a text message to every member of a channel.
procedure Publish(const aText: String; const aChannel: String = '');
| Name | Type | Description |
|---|---|---|
aText | const String | Payload delivered to every subscriber of the channel. |
aChannel | const String | Channel on which the message is published. Leave empty to address the default channel. |
Sends a Presence publish message tagged with the caller's session id and member info. Every client currently subscribed to the channel receives it through OnPublishMsg. If the server cannot deliver it (for example because the channel does not exist or the sender is not allowed to publish), OnErrorPublishMsg fires on this client instead.
oPresence.Publish('hello everyone', 'chat');