2016-08-26 23:42:04 +02:00
[](https://travis-ci.org/warmcat/libwebsockets)
[](https://ci.appveyor.com/project/lws-team/libwebsockets)
2014-12-07 03:36:13 +01:00
[](https://scan.coverity.com/projects/3576)
2014-12-01 01:21:10 +01:00
libwebsockets
-------------
2017-03-16 10:46:31 +08:00
News
----
2018-03-11 11:26:06 +08:00
## Lws has the first official ws-over-h2 server support
2018-03-22 07:44:02 +08:00

2018-03-20 13:28:25 +08:00
There's a new standard on the RFC track that enables multiplexing ws connections
2018-03-11 11:26:06 +08:00
over an http/2 link. Compared to making individual tcp and tls connections for
each ws link back to the same server, this makes your site start up radically
2018-03-20 13:28:25 +08:00
faster, and since all the connections are in one tls tunnel, with considerable memory
2018-03-11 11:26:06 +08:00
reduction serverside.
To enable it on master you just need -DLWS_WITH_HTTP2=1 at cmake. No changes to
existing code are necessary for either http/2 (if you use the official header creation
apis if you return your own headers, as shown in the test apps for several versions)
or to take advantage of ws-over-h2. When built with http/2 support, it automatically
falls back to http/1 and traditional ws upgrade if that's all the client can handle.
2018-03-20 13:28:25 +08:00
Currently only Chrome Canary v67 supports this ws-over-h2 encapsulation (chrome
must be started with `--enable-websocket-over-http2` switch to enable it currently)
but the other browsers will catch up soon.
2018-03-11 11:26:06 +08:00
2018-03-08 12:04:13 +08:00
## New "minimal examples"
https://github.com/warmcat/libwebsockets/tree/master/minimal-examples
2018-03-20 13:28:25 +08:00
These are like the test apps, but focus on doing one thing, the best way, with the minimum amount of code. For example the minimal-http-server serves the cwd on http/1 or http/2 in 50 LOC. Same thing with tls is just three more lines.
2018-03-08 12:04:13 +08:00
2018-03-20 13:28:25 +08:00
They build standalone, so it's easier to copy them directly to start your own project; they
2018-03-08 12:04:13 +08:00
are CC0 licensed (public domain) to facilitate that.
## Windows binary builds
2017-10-26 07:24:45 +08:00
32- and 64-bit Windows binary builds are available via Appveyor. Visit [lws on Appveyor ](https://ci.appveyor.com/project/lws-team/libwebsockets ),
click on a build, the ARTIFACTS, and unzip the zip file at `C:\Program Files (x86)/libwebsockets` .
2018-03-08 12:04:13 +08:00
## Latest Stable
- v2.4.2 is out... HTTP/2 server support and mbedTLS as a TLS backend.
2017-10-16 20:09:58 +08:00
see the changelog https://github.com/warmcat/libwebsockets/blob/v2.4-stable/changelog
2017-09-22 09:46:58 +08:00
Please note the additional READMEs have moved to ./READMEs/
2018-03-08 12:04:13 +08:00
## ESP32 is supported
2017-07-28 14:13:42 +08:00
2017-03-16 10:46:31 +08:00
ESP32 is now supported in lws! Download the
- factory https://github.com/warmcat/lws-esp32-factory and
- test server app https://github.com/warmcat/lws-esp32-test-server-demos
2018-03-08 12:04:13 +08:00
The ESP32 stuff has my dynamic mbedtls buffer allocation patches applied,
which reduce allocation for small payload TLS links by around 26KiB per connection.
## Support
2016-08-07 08:33:08 +08:00
2013-02-06 16:07:27 +09:00
This is the libwebsockets C library for lightweight websocket clients and
servers. For support, visit
2016-02-21 10:42:46 +08:00
https://libwebsockets.org
https://github.com/warmcat/libwebsockets
2013-02-06 16:07:27 +09:00
and consider joining the project mailing list at
2016-02-21 10:42:46 +08:00
https://libwebsockets.org/mailman/listinfo/libwebsockets
2013-02-06 16:07:27 +09:00
2016-02-21 10:42:46 +08:00
You can get the latest version of the library from git:
2013-02-06 16:07:27 +09:00
2014-12-01 01:21:10 +01:00
- https://github.com/warmcat/libwebsockets
2016-02-21 10:42:46 +08:00
- https://libwebsockets.org/git
2013-02-06 16:07:27 +09:00
2016-06-20 17:05:31 +08:00
Doxygen API docs for master: https://libwebsockets.org/lws-api-doc-master/html/index.html
2013-02-06 16:07:27 +09:00
2014-12-01 01:21:10 +01:00
After libwebsockets 1.3, tags will be signed using a key corresponding to this public key
2014-11-09 12:05:29 +08:00
2014-12-01 01:21:10 +01:00
```
2014-11-09 12:05:29 +08:00
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFRe35QBEADZA7snW7MoEXkT2deDYZeggVD3694dg1o5G4q36NWjC8Pn/b2V
d+L9Nmw8ydK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