canonical libwebsockets.org websocket library
Find a file
2018-04-27 14:36:10 +08:00
cmake tcp keepalive: user TCP_USER_TIMEOUT on linux if extant 2018-04-19 16:16:48 +08:00
contrib travis: h2spec integration 2018-04-26 15:27:02 +08:00
doc-assets smp: add some overview docs on the related minimal example 2018-04-19 16:16:48 +08:00
lib refactor: move everything related to HTTP_PROXY out of struct lws and private-libwebsockets.h into http role private 2018-04-27 14:36:10 +08:00
lwsws lws_buflist 2018-04-19 16:15:10 +08:00
minimal-examples qa: add 6 x h2load tests 2018-04-27 11:19:09 +08:00
plugin-standalone plugin-standalone: refactor cmake part to ease multiple sources 2017-05-06 06:38:59 +08:00
plugins cmake: allow setting LWS_ROLE_WS 2018-04-25 08:42:18 +08:00
READMEs travis: h2spec integration 2018-04-26 15:27:02 +08:00
scripts travis: refactor the yml and add smp-specific tests 2018-04-27 14:22:58 +08:00
test-apps qa: add 6 x h2load tests 2018-04-27 11:19:09 +08:00
win32port zlib: Avoid pre-decrement of pointer in big-endian CRC calculation 2018-04-19 16:15:10 +08:00
.gitignore Esp32: allow build on windows 2017-12-01 11:37:35 +08:00
.travis.yml travis: refactor the yml and add smp-specific tests 2018-04-27 14:22:58 +08:00
appveyor.yml appveyor: add build ID to artifact paths 2018-02-06 07:14:38 +08:00
changelog v2.4.0 2017-10-17 13:21:12 +08:00
CMakeLists.txt qa: add 6 x h2load tests 2018-04-27 11:19:09 +08:00
component.mk acme: adaptations through plat for esp32 2017-12-11 13:30:12 +08:00
Kconfig esp32: enforce ssl nonblocking 2017-04-03 14:09:37 +08:00
libwebsockets.dox plat: remove esp8266 2017-12-01 11:37:36 +08:00
LICENSE clean up top level of project 2017-09-27 08:24:05 +08:00
Makefile.projbuild esp32-selfsigned 2017-12-01 11:37:35 +08:00
README.md travis: refactor the yml and add smp-specific tests 2018-04-27 14:22:58 +08:00

Travis Build Status Appveyor Build status Coverity Scan Build Status

lws-overview

News

Major CI improvements for QA

The Travis build of lws done on every commit now runs

Tests Count Explanation
Build / Linux / gcc 13 -Wall -Werror cmake config variants
Build / Mac / Clang 13 -Wall -Werror cmake config variants
Build / Windows / MSVC 7 default
Selftests 33 minimal examples built and run against each other and remote server
attack.sh 225 Correctness, robustness and security tests for http parser
Autobahn Server 480 Testing lws ws client, including permessage-deflate
Autobahn Client 480 Testing lws ws server, including permaessage-deflate
h2spec 146 Http/2 server compliance suite (in strict mode)
h2load 6 Http/2 server load tool (checks 10K / 100K in h1 and h2, at 1, 10, 100 concurrency)
h2load SMP 6 Http/2 and http/1.1 server load checks on SMP server build

The over 1,400 tests run on every commit take most of an hour to complete. If any problems are found, it breaks the travis build, generating an email.

Current master passes all the tests and these new CI arrangements will help keep it that way.

Lws has the first official ws-over-h2 server support

wss-over-h2

There's a new standard on the RFC track that enables multiplexing ws connections 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 faster, and since all the connections are in one tls tunnel, with considerable memory 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.

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.

New "minimal examples"

https://github.com/warmcat/libwebsockets/tree/master/minimal-examples

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.

They build standalone, so it's easier to copy them directly to start your own project; they are CC0 licensed (public domain) to facilitate that.

Windows binary builds

32- and 64-bit Windows binary builds are available via Appveyor. Visit lws on Appveyor, click on a build, the ARTIFACTS, and unzip the zip file at C:\Program Files (x86)/libwebsockets.

Latest Stable

  • v2.4.2 is out... HTTP/2 server support and mbedTLS as a TLS backend.

see the changelog https://github.com/warmcat/libwebsockets/blob/v2.4-stable/changelog

Please note the additional READMEs have moved to ./READMEs/

ESP32 is supported

ESP32 is now supported in lws! Download the

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

This is the libwebsockets C library for lightweight websocket clients and servers. For support, visit

https://libwebsockets.org https://github.com/warmcat/libwebsockets

and consider joining the project mailing list at

https://libwebsockets.org/mailman/listinfo/libwebsockets

You can get the latest version of the library from git:

Doxygen API docs for master: https://libwebsockets.org/lws-api-doc-master/html/index.html