Page 1 of 1

Websocket error handling

Posted: 01 Feb 2018 10:10
by Provo
From what I can read out of the developer's manual and my own experiments, the websocket implementation seems a bit lacking.

In my application, I need to differentiate between different kinds of errors – timeout, no route to host and connection refused, specifically. The event passed to the onerror function on error has only one element, "data", which contains only the string "Connection error" on all of the errors above.

I also need to adjust the timeout parameter. I can't find any way of doing this either.

Does there already exist a way to differentiate between the errors and set the timeout parameter that I haven't found?

Re: Websocket error handling

Posted: 07 Feb 2018 00:53
by PoltoS
Not really. We uses libwebsocket implementation. If you find how to get that in this lib, we can improve our implementation then