[Libwebsockets] timeout on ws client connect?

Dave Horton daveh at beachdognet.com
Sat Jan 26 14:29:00 CET 2019


I am running into an issue where I try to connect to a disfunctional server (a non-lws server that I was running a load test against, and it seemed at some point to fail over), and the connect attempt seemed to just hang — I never got either a LWS_CALLBACK_CLIENT_ESTABLISHED or a LWS_CALLBACK_CLIENT_CONNECTION_ERROR as far as I can tell.

I’m wondering — is there a way for me to either configure a connect timeout when using lws_client_connect_via_info, or alternatively cause a long-running connection to fail from another thread.

Also - am I guaranteed to get either LWS_CALLBACK_CLIENT_ESTABLISHED or a LWS_CALLBACK_CLIENT_CONNECTION_ERROR every time I call lws_client_connect_via_info, even it it returns 0 ?

Dave


More information about the Libwebsockets mailing list