FireSharp
FireSharp copied to clipboard
Subscribe
Hi,
I have one question . I want to recieve only notification. The question is actualy how to subscribe on topic and which function to use for receiving notifications.
Please if you coulde give some basic example.
Hi, its easy:
EventStreamResponse response = await _client.OnAsync("chat", (sender, args, context) => { System.Console.WriteLine(args.Data); });
If you want a notification only change System.Console.WriteLine to a MessageBox. Obviously if you are using a WPF o a windows forms.