[Libwebsockets] http server: LWS_CALLBACK_ESTABLISHED & LWS_CALLBACK_CLOSED
"Andy Green (林安廸)"
andy at warmcat.com
Mon Jun 10 15:03:52 CEST 2013
On 10/06/13 20:36, the mail apparently from Niall Davidson included:
> Are there any plans to implement these callbacks when using the
> HTTP(S) protocol component? Or any specific reason why they're not
> being used?
Yes the ESTABLISHED callback has the specific meaning that a *websocket*
link was established though.
There's a different one when a HTTP GET is received that is not trying
to upgrade the connection to Websockets.
> The reason I ask is that I am operating lws in a threaded app and I'm
> making async calls to a db to retrieve info, trying to keep track of
> whether or not an http socket has disappeared when an async call
> returns seems to be all but impossible given the current
> implementation. Having LWS_CALLBACK_ESTABLISHED & LWS_CALLBACK_CLOSED
> would be useful to allow me to properly determine when a problem has
I see... it is possible to add a callback for this.
What exactly are you thinking it should reflect, something like ACCEPTED
when the listening socket accepts a connection? CLOSE_HTTP?
More information about the Libwebsockets