I'm developing a windows desktop application WebSocket client, I use WebSocket-Sharp nuget to connect to the server.
My problem is when the connection is Idle for some time, my client will not send any pong
responses to server ping
requests, by checking Fiddler (screenshot below) you can see that third server ping
request always will hang and no response will be sent.
I try to send ping
requests from my client to server every 10 seconds (rather than waiting server to send ping
every 20 seconds), by checking Fiddler I can see that my client is sending ping
requests to server and server response properly, but actually after a small period of Idle time (around 30 seconds) my client ping
requests result is False
(which mean they failed).
Update 1: I forget to mention that when I test server using "Simple Web Socket Client" Chrome extension it is working fine with no issues.
My questions are:
- Does anybody know how I can troubleshoot or solve thisproblem in websocket-sharp nuget?
- Do you recommend any other nuget package or should I build my cleint from scratch rather than depending on third-party libraries?