Specify timeout for websocket connection
I'm using Marfusios' websocket-client and I'm trying to specify a timeout period for establishing the connection, but I'm unsure how, or if it's even possible.
The GitHub demonstrates creating a factory for some client settings, but there are no options for specifying a timeout period
One client constructor gives the option for a
connectionFactory
, where a cancelation token can be provided, but I'm unure how to use it (I'm still pretty fresh to C#):
3 Replies
bump
1. Skip WebSockets libraries and use SignalR if you can. 2. There are too many WebSockets libraries out there, so just pick up one that has rich documentation.
Yea, I noticed there are quite a few. Websocket.Client had the most downloads (2m+) so I just went with that one
I’ll look at SignalR though