pusher / pusher-websocket-dotnet

Pusher Channels Client Library for .NET
MIT License
111 stars 113 forks source link

How to bind to "pusher: subscription_succeeded" event? #103

Closed mab09 closed 3 years ago

mab09 commented 3 years ago

Hello, I do not recieve a "pusher: subscription_succeeded" event when I bind my channel to it. I am guessing that something like

_updatesChannel = await pusher.SubscribeAsync(_uChannel);
_updatesChannel.Subscribed += OnUChannelSubscribed;

Is to accomplish that but the ".Subscribed" doesn't always gets triggered, I have many such channels and I only get "OnUChannelSubscribed()" for only 1-2 of them, probably because for some the ".Subscribed" gets triggered even before it is set to activate "OnUChannelSubscribed()".

I am basically looking to get the correct number of subscription success messages before whatever bindings I make to those channels

Thanks

mab09 commented 3 years ago

For now doing a BindAll/Bind with the pusher object instead of the channel object seem to give the feedback messages that I am looking for. Feel free to close the issue.

benw-pusher commented 3 years ago

Thanks @mab09. We will close this as it doesn't appear to be a bug with the lib. Glad you;ve found a solution using bindall.