UnsubscribeAsync #
Removes a subscription.
Arguments #
public async Task UnsubscribeAsync(string roomId);
Argument | Type | Description |
---|---|---|
room_id | string& | Subscription room ID |
Exceptions #
Throws a KuzzleException
if there is an error. See how to handle error.
Usage #
NotificationHandler listener = (notification) => {};
try {
string room_id = await kuzzle.Realtime.SubscribeAsync(
"nyc-open-data",
"yellow-taxi",
new JObject(),
listener);
await kuzzle.Realtime.UnsubscribeAsync(room_id);
Console.WriteLine("Successfully unsubscribed");
} catch (KuzzleException e) {
Console.WriteLine(e);
}
Edit this page on Github(opens new window)