FireSharp icon indicating copy to clipboard operation
FireSharp copied to clipboard

Subscribe

Open rajkovicbojan opened this issue 8 years ago • 2 comments

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.

rajkovicbojan avatar Sep 12 '17 10:09 rajkovicbojan

Hi, its easy:

EventStreamResponse response = await _client.OnAsync("chat", (sender, args, context) => { System.Console.WriteLine(args.Data); });

fabricciotc avatar Mar 07 '19 16:03 fabricciotc

If you want a notification only change System.Console.WriteLine to a MessageBox. Obviously if you are using a WPF o a windows forms.

fabricciotc avatar Mar 07 '19 16:03 fabricciotc