Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1544757757, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ { "schema":"libjg2-1", "oid":{ "oid": "fdf2c7ae29ac6ba614c8f28e9f3e23a0fbabef00", "alias": [ "refs/heads/v3.1-stable"]},"tree": [ { "name": "READMEs","mode": "16384", "size":0}, { "name": "cmake","mode": "16384", "size":0}, { "name": "contrib","mode": "16384", "size":0}, { "name": "doc-assets","mode": "16384", "size":0}, { "name": "include","mode": "16384", "size":0}, { "name": "lib","mode": "16384", "size":0}, { "name": "lwsws","mode": "16384", "size":0}, { "name": "minimal-examples","mode": "16384", "size":0}, { "name": "plugin-standalone","mode": "16384", "size":0}, { "name": "plugins","mode": "16384", "size":0}, { "name": "scripts","mode": "16384", "size":0}, { "name": "test-apps","mode": "16384", "size":0}, { "name": "win32port","mode": "16384", "size":0}, { "name": ".gitignore","mode": "33188", "size":685}, { "name": ".mailmap","mode": "33188", "size":103}, { "name": ".travis.yml","mode": "33188", "size":2452}, { "name": "CMakeLists.txt","mode": "33188", "size":77342}, { "name": "Kconfig","mode": "33188", "size":857}, { "name": "LICENSE","mode": "33188", "size":28754}, { "name": "Makefile.projbuild","mode": "33188", "size":54}, { "name": "README.md","mode": "33188", "size":9980}, { "name": "appveyor.yml","mode": "33188", "size":3004}, { "name": "changelog","mode": "33188", "size":40786}, { "name": "component.mk","mode": "33188", "size":1659}, { "name": "libwebsockets.dox","mode": "33188", "size":13465}],"s":{"c":1544704007,"u": 2613}} ,{"schema":"libjg2-1", "cid":"d1cc196d07ab01ec3e66916cb83ab7e3", "oid":{ "oid": "fdf2c7ae29ac6ba614c8f28e9f3e23a0fbabef00", "alias": [ "refs/heads/v3.1-stable"]},"blobname": "README.md", "blob": "[![Travis Build Status](https://travis-ci.org/warmcat/libwebsockets.svg)](https://travis-ci.org/warmcat/libwebsockets) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/qfasji8mnfnd2r8t?svg\u003dtrue)](https://ci.appveyor.com/project/lws-team/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\u003dgithub.com\u0026amp;utm_medium\u003dreferral\u0026amp;utm_content\u003dwarmcat/libwebsockets\u0026amp;utm_campaign\u003dBadge_Grade)\n\n# Libwebsockets\n\nLibwebsockets is a simple-to-use, pure C library providing client and server\nfor **http/1**, **http/2**, **websockets** and other protocols in a security-minded,\nlightweight, configurable, scalable and flexible way. It's easy to build and\ncross-build via cmake and is suitable for tasks from embedded RTOS through mass\ncloud serving.\n\n[50 minimal examples](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples) for\nvarious scenarios, CC0-licensed (public domain) for cut-and-paste, allow you to get started quickly.\n\n![overview](./doc-assets/lws-overview.svg)\n\nNews\n----\n\n## v3.1 released: new features in v3.1\n\n - **lws threadpool** - lightweight pool of pthreads integrated to lws wsi, with all\n synchronization to event loop handled internally, queue for excess tasks\n [threadpool docs](https://libwebsockets.org/git/libwebsockets/tree/lib/misc/threadpool), \n [threadpool minimal example](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/ws-server/minimal-ws-server-threadpool), \n Cmake config: `-DLWS_WITH_THREADPOOL\u003d1`\n\n - **libdbus support** integrated on lws event loop\n [lws dbus docs](https://libwebsockets.org/git/libwebsockets/tree/lib/roles/dbus), \n [lws dbus client minimal examples](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/dbus-client), \n [lws dbus server minimal examples](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/dbus-server), \n Cmake config: `-DLWS_ROLE_DBUS\u003d1`\n\n - **lws allocated chunks (lwsac)** - helpers for optimized mass allocation of small\n objects inside a few larger malloc chunks... if you need to allocate a lot of\n inter-related structs for a limited time, this removes per-struct allocation\n library overhead completely and removes the need for any destruction handling\n [lwsac docs](https://libwebsockets.org/git/libwebsockets/tree/lib/misc/lwsac), \n [lwsac minimal example](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/api-tests/api-test-lwsac), \n Cmake Config: `-DLWS_WITH_LWSAC\u003d1`\n\n - **lws tokenizer** - helper api for robustly tokenizing your own strings without\n allocating or adding complexity. Configurable by flags for common delimiter\n sets and comma-separated-lists in the tokenizer. Detects and reports syntax\n errors.\n [lws_tokenize docs](https://libwebsockets.org/git/libwebsockets/tree/include/libwebsockets/lws-tokenize.h), \n [lws_tokenize minimal example / api test](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/api-tests/api-test-lws_tokenize)\n\n - **lws full-text search** - optimized trie generation, serialization,\n autocomplete suggestion generation and instant global search support extensible\n to huge corpuses of UTF-8 text while remaining super lightweight on resources.\n [full-text search docs](https://libwebsockets.org/git/libwebsockets/tree/lib/misc/fts), \n [full-text search minimal example / api test](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/api-tests/api-test-fts), \n [demo](https://libwebsockets.org/ftsdemo/), \n [demo sources](https://libwebsockets.org/git/libwebsockets/tree/plugins/protocol_fulltext_demo.c), \n Cmake config: `-DLWS_WITH_FTS\u003d1 -DLWS_WITH_LWSAC\u003d1`\n\n - **gzip + brotli http server-side compression** - h1 and h2 detection of client support\n for server compression, and auto-application to files with mimetypes \u0022text/*\u0022,\n \u0022application/javascript\u0022 and \u0022image/svg.xml\u0022.\n Cmake config: `-DLWS_WITH_HTTP_STREAM_COMPRESSION\u003d1` for gzip, optionally also give\n `-DLWS_WITH_HTTP_BROTLI\u003d1` for preferred `br` brotli compression\n\n - **managed disk cache** - API for managing a directory containing cached files\n with hashed names, and automatic deletion of LRU files once the cache is\n above a given limit.\n [lws diskcache docs](https://libwebsockets.org/git/libwebsockets/tree/include/libwebsockets/lws-diskcache.h), \n Cmake config: `-DLWS_WITH_DISKCACHE\u003d1`\n\n - **http reverse proxy** - lws mounts support proxying h1 or h2 requests to\n a local or remote IP, or unix domain socket over h1. This allows microservice\n type architectures where parts of the common URL space are actually handled\n by external processes which may be remote or on the same machine.\n [lws gitohashi serving](https://libwebsockets.org/git/) is handled this way.\n [unix domain sockets reverse proxy docs](https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.unix-domain-reverse-proxy.md), \n CMake config: `-DLWS_WITH_HTTP_PROXY\u003d1` and `-DLWS_UNIX_SOCK\u003d1` for Unix Domain Sockets\n\n - **update minimal examples for strict Content Security Policy** the minimal\n examples now show the best practices around Content Security Policy and\n disabling inline Javascript. Updated examples that are served with the\n recommended security restrictions show a new \u0022Strict Content Security Policy\u0022\n graphic. [Read how to upgrade your applications to use a strict CSP](https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.content-security-policy.md).\n\n - **release policy docs** - unsure what branch, version or tag to use, or how\n to follow master cleanly? [Read the release policy docs](https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.release-policy.md)\n which explain how and why lws is developed, released and maintained.\n\n## v3.0.1 released\n\nSee the git log for the list of fixes.\n\n## v3.0.0 released\n\nSee the changelog for info https://libwebsockets.org/git/libwebsockets/tree/changelog?h\u003dv3.0-stable\n\n## Major CI improvements for QA\n\nThe Travis build of lws done on every commit now runs:\n\nTests|Count|Explanation\n---|---|---\nBuild / Linux / gcc|16|-Wall -Werror cmake config variants\nBuild / Mac / Clang|16|-Wall -Werror cmake config variants\nBuild / Windows / MSVC|7|default\nSelftests|openssl:43, mbedtls:43|minimal examples built and run against each other and remote server\nattack.sh|225|Correctness, robustness and security tests for http parser\nAutobahn Server|480|Testing lws ws client, including permessage-deflate\nAutobahn Client|480|Testing lws ws server, including permaessage-deflate\nh2spec|openssl:146, mbedtls:146|Http/2 server compliance suite (in strict mode)\nh2load|openssl:6, mbedtls:6|Http/2 server load tool (checks 10K / 100K in h1 and h2, at 1, 10, 100 concurrency)\nh2load SMP|6|Http/2 and http/1.1 server load checks on SMP server build\n\nThe over 1,500 tests run on every commit take 1hr 15 of compute time to complete.\nIf any problems are found, it breaks the travis build, generating an email.\n\nCodacy also checks every patch and the information used to keep lws at zero issues.\n\nCurrent master is checked by Coverity at least daily and kept at zero issues.\n\nCurrent master passes all the tests and these new CI arrangements will help\nkeep it that way.\n\n## Lws has the first official ws-over-h2 server support\n\n![wss-over-h2](./doc-assets/wss2.png)\n\nThere's a new [RFC](https://tools.ietf.org/html/rfc8441) that enables multiplexing ws connections\nover an http/2 link. Compared to making individual tcp and tls connections for\neach ws link back to the same server, this makes your site start up radically\nfaster, and since all the connections are in one tls tunnel, with considerable memory\nreduction serverside.\n\nTo enable it on master you just need -DLWS_WITH_HTTP2\u003d1 at cmake. No changes to\nexisting code are necessary for either http/2 (if you use the official header creation\napis if you return your own headers, as shown in the test apps for several versions)\nor to take advantage of ws-over-h2. When built with http/2 support, it automatically\nfalls back to http/1 and traditional ws upgrade if that's all the client can handle.\n\nCurrently only Chrome Canary v67 supports this ws-over-h2 encapsulation (chrome\nmust be started with `--enable-websocket-over-http2` switch to enable it currently),\nand patches exist for Firefox. Authors of both browser implementations tested\nagainst the lws server implementation.\n\n## New \u0022minimal examples\u0022\n\nhttps://libwebsockets.org/git/libwebsockets/tree/minimal-examples\n\nThese are like the test apps, but focus on doing one thing, the best way, with the\nminimum amount of code. For example the minimal-http-server serves the cwd on\nhttp/1 or http/2 in 50 LOC. Same thing with tls is just three more lines.\n\nThey build standalone, so it's easier to copy them directly to start your own project; they\nare CC0 licensed (public domain) to facilitate that.\n\n## Windows binary builds\n\n32- and 64-bit Windows binary builds are available via Appveyor. Visit\n[lws on Appveyor](https://ci.appveyor.com/project/lws-team/libwebsockets),\nclick on a build, the ARTIFACTS, and unzip the zip file at `C:\u005cProgram Files (x86)/libwebsockets`.\n\n## Support\n\nThis is the libwebsockets C library for lightweight websocket clients and\nservers. For support, visit\n\n https://libwebsockets.org\n\nand consider joining the project mailing list at\n\n https://libwebsockets.org/mailman/listinfo/libwebsockets\n\nYou can get the latest version of the library from git:\n\n- https://libwebsockets.org/git\n\nDoxygen API docs for master: https://libwebsockets.org/lws-api-doc-master/html/index.html\n\n","s":{"c":1544704007,"u": 3171}} ],"g": 846,"chitpc": 0,"ehitpc": 0, "indexed":0 }