TsgcWSPClient_Dataset › Methods › Subscribe
Subscribes the client to a custom channel.
procedure Subscribe(const aChannel: String; const aGuid: String = '');
| Name | Type | Description |
|---|---|---|
aChannel | const String | Name of the channel to subscribe to. |
aGuid | const String | Optional Guid of the target server-side Dataset protocol instance. Leave empty to use the default. |
Sends a subscribe request for the given channel. When the server confirms the subscription, the OnSubscription event fires. After subscribing, messages published to the channel are delivered through OnEvent. Use Subscribe_all for the internal new/update/delete Dataset channels.
oProtocol.Subscribe('news');