[Libwebsockets] v2.0

Andy Green andy at warmcat.com
Thu May 5 04:20:54 CEST 2016


Hi -

Libwebsockets v2.0 is out.

The site is updated

https://libwebsockets.org/

as is the page about v2.0 new features

https://libwebsockets.org/lws-2.0-new-features.html

and the changelog

https://github.com/warmcat/libwebsockets/blob/v2.0-stable/changelog

I replaced apache for my web services some weeks ago and have been using 
lwsws (the new generic webserver wrapper on lws) instead, you can see 
the new server status page here

https://libwebsockets.org/server-status/

This is an included lws protocol plugin, although you would probably 
want to put it on a vhost mapped to localhost interface only.


Basically the theme of the release is eliminate server boilerplate code 
and use plugins for ws protocols.  With this method, the test server is 
reduced to one short file with no protocols or user callback.

https://github.com/warmcat/libwebsockets/blob/v2.0-stable/test-server/test-server-v2.0.c

If you use lwsws, the generic webserver wrapper which uses JSON config 
files, you can even eliminate the above code as well.

https://github.com/warmcat/libwebsockets/blob/v2.0-stable/README.lwsws.md

Protocol plugins can be be easily built against lws out-of-tree

https://github.com/warmcat/libwebsockets/tree/v2.0-stable/plugin-standalone

and distributed in their own directories, lws scans in a given list of 
directories for them at startup (and for lwsws, that list is gleaned 
from JSON config fragments in a conf.d/)

In addition to passing the usual Travis + Appveyor it's checked on 
Coverity today and is zero defects.

https://scan.coverity.com/projects/warmcat-libwebsockets

Branch v2.0-stable is also set up for the usual ongoing fixes while 
development continues on master.

Enjoy!

-Andy



More information about the Libwebsockets mailing list