C# ClientWebSocket retry after connection error

999 views Asked by At

Is there any way to know whether ClientWebSocket connection is closed/disconnected? I am using slack RTM api in C# and sometimes due to connectivity issues connection is closed from server, then I want to retry connection.

I am connecting to websocket server like this

var client = new ClientWebSocket();
client.ConnectAsync(url, token);
0

There are 0 answers