[Libwebsockets] FYI: qpid-dispatch project now has websocket integration using libwebsockets

Alan Conway aconway at redhat.com
Fri Dec 2 14:49:22 CET 2016


On Fri, 2016-12-02 at 03:47 +0800, Andy Green wrote:
> > wrote:
> > 
[snip]
> > sec delay before CLOSED but that isn't a problem if it's expected
> > behavior. Now to embed a http server :)
> 
> I really recommend using the "mount" support in v2.0+.  Basically you
> bind a directory to a 'mountpoint' in the url space, and lws takes
> care of all the serving without your having to provide any related
> callback handlers.  There's a test-server-v2.0.c that shows how to
> register a linked-list of mounts when creating a vhost.
> 

I got it working with callbacks but I'll switch to mount, my noddy HTTP
server is probably not very HTTP-compliant :) 

I still need to know when a socket goes into a HUP or error state so I
can take it out of my poll loop while LWS is doing timeouts etc. before
finally closing it. Is there a way to do that with the mount option? If
not I can fix it from my end, but so far I've been managing that from
the LWS callbacks.

Next up SSL (and maybe a bit of protocol sniffing) and we will be ready
for launch.

Thanks,
Alan.



More information about the Libwebsockets mailing list