Websocket error handling

Discussions about Z-Way software and Z-Wave technology in general
Post Reply
Provo
Posts: 112
Joined: 19 Oct 2016 19:54

Websocket error handling

Post by Provo » 01 Feb 2018 10:10

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?

User avatar
PoltoS
Posts: 4068
Joined: 26 Jan 2011 19:36

Re: Websocket error handling

Post by PoltoS » 07 Feb 2018 00:53

Not really. We uses libwebsocket implementation. If you find how to get that in this lib, we can improve our implementation then

Post Reply