TsgcWSPClient_sgc › Methods › UnSubscribe
Unsubscribes the client from a custom channel.
procedure UnSubscribe(const aChannel: String; const aGuid: String = '');
| Name | Type | Description |
|---|---|---|
aChannel | const String | Name of the channel to unsubscribe from. |
aGuid | const String | Optional Guid of the target server-side sgc protocol instance. Leave empty to use the default. |
Removes the client from the given channel. When the server confirms the removal, the OnUnSubscription event fires and no further OnEvent messages are delivered for that channel.
aChannel is matched as an exact string, the same as in Subscribe. Several channels can be unsubscribed in one call using a comma-delimited list: oProtocol.UnSubscribe('topic1/a,topic1/b');
oProtocol.UnSubscribe('news');