1d4afb5ceSopenharmony_ci[![CI status](https://libwebsockets.org/sai/status/libwebsockets)](https://libwebsockets.org/git/libwebsockets) [![Coverity Scan Build Status](https://scan.coverity.com/projects/3576/badge.svg)](https://scan.coverity.com/projects/3576) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2266/badge)](https://bestpractices.coreinfrastructure.org/projects/2266) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/144fb195a83046e484a75c8b4c6cfc99)](https://www.codacy.com/app/lws-team/libwebsockets?utm_source=github.com&utm_medium=referral&utm_content=warmcat/libwebsockets&utm_campaign=Badge_Grade) [![Total alerts](https://img.shields.io/lgtm/alerts/g/warmcat/libwebsockets.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/warmcat/libwebsockets/alerts/) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/warmcat/libwebsockets.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/warmcat/libwebsockets/context:cpp) [![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/warmcat/libwebsockets.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/warmcat/libwebsockets/context:javascript)
2d4afb5ceSopenharmony_ci
3d4afb5ceSopenharmony_ci# Libwebsockets
4d4afb5ceSopenharmony_ci
5d4afb5ceSopenharmony_ciLibwebsockets is a simple-to-use, MIT-license, pure C library providing client and server
6d4afb5ceSopenharmony_cifor **http/1**, **http/2**, **websockets**, **MQTT** and other protocols in a security-minded,
7d4afb5ceSopenharmony_cilightweight, configurable, scalable and flexible way.  It's easy to build and
8d4afb5ceSopenharmony_cicross-build via cmake and is suitable for tasks from embedded RTOS through mass
9d4afb5ceSopenharmony_cicloud serving.
10d4afb5ceSopenharmony_ci
11d4afb5ceSopenharmony_ciIt supports a lot of lightweight ancilliary implementations for things like JSON,
12d4afb5ceSopenharmony_ciCBOR, JOSE, COSE, and supports OpenSSL and MbedTLS v2 and v3 out of the box for everything.
13d4afb5ceSopenharmony_ciIt's very gregarious when it comes to event loop sharing, supporting libuv, libevent, libev,
14d4afb5ceSopenharmony_cisdevent, glib and uloop, as well as custom event libs.
15d4afb5ceSopenharmony_ci
16d4afb5ceSopenharmony_ci[100+ independent minimal examples](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples) for various scenarios, CC0-licensed
17d4afb5ceSopenharmony_ci(public domain) for cut-and-paste, allow you to get started quickly.
18d4afb5ceSopenharmony_ci
19d4afb5ceSopenharmony_ci[There are a lot of READMEs](https://libwebsockets.org/git/libwebsockets/tree/READMEs) on a variety of topics.
20d4afb5ceSopenharmony_ci
21d4afb5ceSopenharmony_ci[We do a huge amount of CI testing per push](https://libwebsockets.org/sai/), currently 582 builds on 30 platforms.
22d4afb5ceSopenharmony_ci[You can see the lws CI rack and read about how lws-based Sai is used to coordinate all the testing](https://warmcat.com/2021/08/21/Sai-CI.html).
23d4afb5ceSopenharmony_ci
24d4afb5ceSopenharmony_ci![overview](./doc-assets/lws-overview.png)
25d4afb5ceSopenharmony_ci
26d4afb5ceSopenharmony_ciNews
27d4afb5ceSopenharmony_ci----
28d4afb5ceSopenharmony_ci
29d4afb5ceSopenharmony_ci## v4.3 is released
30d4afb5ceSopenharmony_ci
31d4afb5ceSopenharmony_ciSee the [changelog](https://libwebsockets.org/git/libwebsockets/tree/changelog)
32d4afb5ceSopenharmony_ci
33d4afb5ceSopenharmony_ci
34d4afb5ceSopenharmony_ci## Lws work retrospective
35d4afb5ceSopenharmony_ci
36d4afb5ceSopenharmony_ciThe initial commit for lws will have been 11 years ago come Oct 28 2021, it's been a lot of work.
37d4afb5ceSopenharmony_ciThere are a total of 4.3K patches, touching 800KLOC cumulatively (this is not the size in the
38d4afb5ceSopenharmony_cirepo, but over the years, how many source lines were changed by patches).
39d4afb5ceSopenharmony_ci
40d4afb5ceSopenharmony_ci![overview](./doc-assets/work.png)
41d4afb5ceSopenharmony_ci
42d4afb5ceSopenharmony_ciGratifyingly, it turns out over the years, ~15% of that was contributed by 404 contributors: that's not so bad.
43d4afb5ceSopenharmony_ciThanks a lot to everyone who has provided patches.
44d4afb5ceSopenharmony_ci
45d4afb5ceSopenharmony_ciToday at least tens of millions of devices and product features rely on lws to
46d4afb5ceSopenharmony_cihandle their communications including several from FAANG; Google now include lws
47d4afb5ceSopenharmony_cias part of Android sources.
48d4afb5ceSopenharmony_ci
49d4afb5ceSopenharmony_ci## Support
50d4afb5ceSopenharmony_ci
51d4afb5ceSopenharmony_ciThis is the libwebsockets C library for lightweight websocket clients and
52d4afb5ceSopenharmony_ciservers.  For support, visit
53d4afb5ceSopenharmony_ci
54d4afb5ceSopenharmony_ci https://libwebsockets.org
55d4afb5ceSopenharmony_ci
56d4afb5ceSopenharmony_ciand consider joining the project mailing list at
57d4afb5ceSopenharmony_ci
58d4afb5ceSopenharmony_ci https://libwebsockets.org/mailman/listinfo/libwebsockets
59d4afb5ceSopenharmony_ci
60d4afb5ceSopenharmony_ciYou can get the latest version of the library from git:
61d4afb5ceSopenharmony_ci
62d4afb5ceSopenharmony_ci- https://libwebsockets.org/git
63d4afb5ceSopenharmony_ci
64d4afb5ceSopenharmony_ciDoxygen API docs for development: https://libwebsockets.org/lws-api-doc-main/html/index.html
65d4afb5ceSopenharmony_ci
66