doghappy / socket.io-client-csharp

socket.io-client implemention for .NET
MIT License
715 stars 124 forks source link

Why there is no returning info onConnected -- OnDisconnected etc #370

Open furkannkilicc opened 3 months ago

furkannkilicc commented 3 months ago

ı can connect with price_changed but there is no connected - OnDisconnected onError etc

socket.On("price_changed", response => { Console.WriteLine("price_changed VERİSİ " + response);

 this.Invoke((MethodInvoker)delegate
 {
     textBox1.Text = "price_changed VERİSİ " + response;
 });

});

socket.OnError += (s, e) => { Console.WriteLine(e); };

socket.OnConnected += (s, e) => { Console.Write("Connected " + socket.Namespace); };

socket.OnDisconnected += (s, e) => { Console.WriteLine("Socket disconnected"); };

furkannkilicc commented 3 months ago

And also disconnectAsync is not working properly

doghappy commented 3 months ago

Sorry I don't understand. the first comment, you mean only the price_changed event can be triggered, other events never been triggered?

furkannkilicc commented 3 months ago

Hi, what I mean is, even though I subscribed to the event, I can't see the other event for example "socket.OnConnected" not printing console .
And my other problem is disconnectAsync triggered on button but not closing connection data is still streaming

Thanks for returning