[Libwebsockets] Forced disconnect for chocked connections
andrejs.hanins at ubnt.com
Wed May 18 11:37:57 CEST 2016
As per documentation, one needs to enable TCP keep-alive to be able to deal with chocked connection (not writable sockets), but in my design there is a higher level timeouts which may request to close a WS connection. Those close requests don't come from the LWS callbacks, so I can't directly return -1 to LWS and need to request writable callback which will never come if the connection is chocked.
I'm thinking about some new API which will give a way to close a socket from outside of the LWS callbacks despite any chocked state.
Andy, others, do you think it could be a valuable improvement? I don't really like that TCP keep-alive is the only way to deal with chocked connections, especially when there are other higher level timeouts implemented in use code.
More information about the Libwebsockets