{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1751176603,
"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",
"cid":"700ce639c25ee329de3d7469009aab7e",
"commit": {"type":"commit",
"time": 1618510624,
"time_ofs": 60,
"oid_tree": { "oid": "fa7fcb1aab741dc6d99675726a159325c6ae4d72", "alias": []},
"oid":{ "oid": "9dbc9b9aceb13f64d94d8bccb3c3d089e7d93352", "alias": []},
"msg": "README.md decruft",
"sig_commit": { "git_time": { "time": 1618510624, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1618510622, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }},
"body": "README.md decruft\n"
,
"diff": "diff --git a/README.md b/README.md\nindex 2013f43..a446b63 100644\n--- a/README.md\n+++ b/README.md\n@@ -8,442 +8,38 @@ lightweight, configurable, scalable and flexible way. It's easy to build and\n cross-build via cmake and is suitable for tasks from embedded RTOS through mass\n cloud serving.\n \n-[80 independent minimal examples](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples) for\n+[80+ independent minimal examples](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples) for\n various scenarios, CC0-licensed (public domain) for cut-and-paste, allow you to get started quickly.\n \n+[There are a lot of READMEs](https://libwebsockets.org/git/libwebsockets/tree/READMEs) on a variety of\n+topics.\n+\n+[We do a huge amount of CI testing per push](https://libwebsockets.org/sai/), currently 495 builds on\n+27 platforms.\n+\n \n \n News\n ----\n \n-## Transition from master branch to main branch\n-\n-\u0022master\u0022 branch was just the default branch name from git originally, it was not selected\n-for lws to have any semantic value in itself. There's no problem changing it to the more\n-universally neutral \u0022main\u0022 other than any explicit references spread around over the last\n-10 years to \u0022master\u0022 breaking, which can be managed.\n-\n-As a first step, I updated my push scripts, that keep libwebsockets.org git and the github\n-mirror in sync, to push stuff on \u0022master\u0022 also to \u0022main\u0022 branch to establish it. If you\n-currently refer to \u0022master\u0022 branch in lws for build or CI, you should switch to using\n-\u0022main\u0022.\n-\n-For the next months the two should run in parallel and I'll move over references to\n-\u0022master\u0022 in lws docs to use \u0022main\u0022, eventually some point after the next release,\n-master will be deleted.\n-\n-In github, I changed its default branch for libwebsockets to \u0022main\u0022, since main and\n-master are updated in lockstep currently, this should hopefully have limited impact.\n-\n-## v4.1.0 and v4.1-stable are released\n-\n-See the [changelog](https://libwebsockets.org/git/libwebsockets/tree/changelog), summary\n-\n- - NEW: travis / appveyor / bintray are replaced by Sai\n- https://libwebsockets.org/sai/ which for lws currently does 167 builds per\n- git push on 16 platforms, all self-hosted. The homebrew bash scripts used\n- to select Minimal examples are replaced by CTest. Platforms currently\n- include Fedora/AMD/GCC, Windows/AMD/mingw32, Windows/AMD/mingw64, Android/\n- aarch64/LLVM, esp-idf (on WROVER-KIT and HELTEC physical boards), Fedora/\n- RISCV (on QEMU)/GCC, CentOS8/AMD/GCC, Gentoo/AMD/GCC, Bionic/AMD/GCC,\n- Linkit 7697, Focal/AMD/GCC, Windows (on QEMU)/AMD/MSVC,\n- Focal/aarch64-RPI4/GCC, iOS/aarch64/LLVM and OSX/AMD/LLVM.\n-\n- - NEW: The single CMakeLists.txt has been refactored and modernized into smaller\n- CMakeLists.txt in the subdirectory along with the code that is being managed\n- for build by it. Build options are still listed in the top level as before\n- but the new way is much more maintainable.\n-\n- - NEW: Captive Portal Detection. Lws can determine if the active default\n- route is able to connect to the internet, or is in a captive portal type\n- situation, by trying to connect to a remote server that will respond in an\n- unusual way, like provide a 204.\n-\n- - NEW: Secure streams: Support system trust store if it exists\n- Build on Windows\n-\t\t\tSupport lws raw socket protocol in SS\n-\t\t\tSupport Unix Domain Socket transport\n-\n- - NEW: Windows: Support Unix Domain Sockets same as other platforms\n-\n- - NEW: Windows: Build using native pthreads, async dns, ipv6 on MSVC\n-\n- - NEW: lws_struct: BLOB support\n-\n- - NEW: lws_sul: Now provides two sorted timer domains, a default one as\n- before, and another whose scheduled events are capable to wake the system from suspend\n-\n- - NEW: System Message Distribution: lws_smd provides a very lightweight way\n- to pass short messages between subsystems both in RTOS type case where the\n- subsystems are all on the lws event loop, and in the case participants are in\n- different processes, using Secure Streams proxying. Participants register a bitmap\n- of message classes they care about; if no particpant cares about a particular message,\n- it is rejected at allocation time for the sender, making it cheap to provide messages\n- speculatively. See lib/system/smd/README.md for full details.\n-\n- - NEW: lws_drivers: wrappers for SDK driver abstractions (or actual drivers)\n-\t\t See lib/drivers/README.md, example implementations\n-\t\t minimal-examples/embedded/esp32/esp-wrover-kit\n- - generic gpio\n-\t\t - generic LED (by name) lib/drivers/led/README.md\n-\t\t - generic PWM, sophisticated interpolated table\n-\t\t sequencers with crossfade \n-\t\t - generic button (by name), with debounce and press classification\n-\t\t emitting rich SMD click, long-click, double-click,\n-\t\t\t\t down, repeat, up JSON messages\n-\t\t\t\t lib/drivers/button/README.md\n-\t\t - bitbang i2c on generic gpio (hw support can use same\n-\t\t abstract API)\n-\t\t - bitbang spi on generic gpio (hw support can use same\n-\t\t abstract API)\n-\t\t - generic display object, can be wired up to controller\n-\t\t drivers that hook up by generic i2c or spi,\n-\t\t\t\t generic backlight PWM sequencing and\n-\t\t\t\t blanking timer support\n-\t\t - generic settings storage: get and set blobs by name\n-\t\t - generic network device: netdev abstract class with\n-\t WIFI / Ethernet implementations\n-\t\t\t\t\t using underlying SDK APIs;\n-\t\t\t\t\t generic 80211 Scan managements\n-\t\t\t\t\t and credentials handling via\n-\t\t\t\t\t lws_settings\n-\t\t This is the new way to provide embedded platform\n-\t\t functionality that was in the past done like\n-\t\t esp32-factory. Unlike the old way, the new way has no\n-\t\t native apis in it and can be built on other SDK / SoCs\n-\t\t the same.\n-\n- - NEW: Security-aware JWS JWT (JSON Web Tokens) apis are provided on top of the existing\n- JOSE / JWS apis. All the common algorithms are available along with some\n- high level apis like lws http cookie -\u003e JWT struct -\u003e lws http cookie.\n-\n- - REMOVED: esp32-helper and friends used by esp32-factory now lws_drivers\n- exists\n-\n- - REMOVED: generic sessions and friends now JWT is provided\n-\n-## v4.0 is released\n-\n-Users wanting a stable branch should follow v4.0-stable to get the most stable version\n-at any given time.\n-\n-See the [changelog](https://libwebsockets.org/git/libwebsockets/tree/changelog) for\n-information on the huge amount of new features in this release, and additional information\n-below.\n-\n-```\n- - NEW: Lws is now under the MIT license, see ./LICENSE for details\n- \n- - NEW: GLIB native event loop support, lws + gtk example\n-\n- - NEW: native lws MQTT client... supports client stream binding like h2 when\n- multiple logical connections are going to the same endpoint over MQTT, they\n- transparently and independently share the one connection + tls tunnel\n- \n- - NEW: \u0022Secure Streams\u0022... if you are making a device with client connections\n- to the internet or cloud, this allows separation of the communications\n- policy (endpoints, tls cert validation, protocols, etc) from the code, with\n- the goal you can combine streams, change protocols and cloud provision, and\n- reflect that in the device's JSON policy document without having to change\n- any code.\n-\n- - NEW: lws_system: New lightweight and efficient Asynchronous DNS resolver\n- implementation for both A and AAAA records, supports recursive (without\n- recursion in code) lookups, caching, and getaddrinfo() compatible results\n- scheme (from cache directly without per-consumer allocation). Able to\n- perform DNS lookups without introducing latency in the event loop.\n-\n- - NEW: lws_system: ntpclient implementation with interface for setting system\n- time via lws_system ops\n- \n- - NEW: lws_system: dhcpclient implementation\n- \n- - NEW: Connection validity tracking, autoproduce PING/PONG for protocols that\n- support it if not informed that the connection has passed data in both\n- directions recently enough\n-\n- - NEW: lws_retry: standardized exponential backoff and retry timing based\n- around backoff table and lws_sul\n-\n- - NEW: there are official public helpers for unaligned de/serialization of all\n- common types, see eh, lws_ser_wu16be() in include/libwebsockets/lws-misc.h\n-\n- - NEW: lws_tls_client_vhost_extra_cert_mem() api allows attaching extra certs\n- to a client vhost from DER in memory\n- \n- - NEW: lws_system: generic blobs support passing auth tokens, per-connection\n- client certs etc from platform into lws\n-\n- - NEW: public helpers to consume and produce ipv4/6 addresses in a clean way,\n- along with lws_sockaddr46 type now public. See eg, lws_sockaddr46-based\n- lws_sa46_parse_numeric_address(), lws_write_numeric_address()\n- in include/libwebsockets/lws-network-helper.h\n-\n- - Improved client redirect handling, h2 compatibility\n- \n- - NEW: lwsac: additional features for constant folding support (strings that\n- already are in the lwsac can be pointed to without copying again), backfill\n- (look for gaps in previous chunks that could take a new use size), and\n- lwsac_extend() so last use() can attempt to use more unallocated chunk space\n-\n- - NEW: lws_humanize: apis for reporting scalar quanties like 1234 as \u00221.234KB\u0022\n- with the scaled symbol strings passed in by caller\n-\n- - NEW: freertos: support lws_cancel_service() by using UDP pair bound to lo,\n- since it doesn't have logical pipes\n-\n- - NEW: \u0022esp32\u0022 plat, which implemented freertos plat compatibility on esp32, is\n- renamed to \u0022freertos\u0022 plat, targeting esp32 and other freertos platforms\n-\n- - NEW: base64 has an additional api supporting stateful decode, where the input\n- is not all in the same place at the same time and can be processed\n- incrementally\n-\n- - NEW: lws ws proxy: support RFC8441\n- \n- - NEW: lws_spawn_piped apis: generic support for vforking a process with child\n- wsis attached to its stdin, stdout and stderr via pipes. When processes are\n- reaped, a specified callback is triggered. Currently Linux + OSX.\n- \n- - NEW: lws_fsmount apis: Linux-only overlayfs mount and unmount management for\n- aggregating read-only layers with disposable, changeable upper layer fs\n-\n- - Improvements for RTOS / small build case bring the footprint of lws v4 below\n- that of v3.1 on ARM \n- \n- - lws_tokenize: flag specifying # should mark rest of line as comment\n-\n- - NEW: minimal example for integrating libasound / alsa via raw file\n-\n- - lws_struct: sqlite and json / lejp translation now usable\n-\n-\n-```\n-\n-## Introducing Secure Streams client support\n-\n-Secure Streams is an optional layer above lws (`-DLWS_WITH_SECURE_STREAMS\u003d1`) that\n-separates connectivity policy into a JSON document, which can be part of the\n-firmware or fetched at boot time.\n-\n-Code no longer deals with details like endpoint specification or tls cert stack used\n-to validate the remote server, it's all specified in JSON, eg, see\n-[this example](https://warmcat.com/policy/minimal-proxy.json). Even the protocol to use to talk to the\n-server, between h1, h2, ws or MQTT, is specified in the policy JSON and the code\n-itself just deals with payloads and optionally metadata, making it possible to\n-switch endpoints, update certs and even switch communication protocols by just\n-editing the JSON policy and leaving the code alone.\n-\n-Logical Secure Stream connections outlive any underlying lws connection, and support\n-\u0022nailed-up\u0022 connection reacquisition and exponential backoff management.\n-\n-See [./lib/secure-streams/README.md](https://libwebsockets.org/git/libwebsockets/tree/lib/secure-streams/README.md) and the related minimal examples\n-for more details.\n-\n-## mqtt client support\n+## Request for help on mp4 / h.264 / libav*\n \n-If you enable `-DLWS_ROLE_MQTT\u003d1`, lws can now support QoS0 and QoS1 MQTT client\n-connections. See the examples at ./minimal-examples/mqtt-client\n+If you're interested in ws + h.264, there's a 80-90% complete minimal example that needs\n+help with the mp4 container part, the lws v4l2 integration, MPJPG-\u003eh.264 transcoding and\n+ws transport to MediaSource parts already work.\n \n-## libglib native event loop support\n+Take a look at the top two patches on `_v4l2` branch and post on the mailing list or\n+github to discuss if you can help.\n \n-glib's event loop joins libuv, libevent and libev support in lws for both the\n-`lws_context` creating and owning the loop object for its lifetime, and for\n-an already-existing \u0022foreign loop\u0022 where the `lws_context` is created, attaches,\n-detaches, and is destroyed without affecting the loop.\n+## v4.2 is released\n \n-This allows direct, lock-free integration of lws functionality with, eg, a GTK app's\n-existing `GMainLoop` / glib `g_main_loop`. Just select `-DLWS_WITH_GLIB\u003d1` at cmake\n-time to enable. The -eventlib minimal examples also support --glib option to\n-select using the glib loop at runtime.\n+See the [changelog](https://libwebsockets.org/git/libwebsockets/tree/changelog)\n \n-There's also a gtk example that is built if lws cmake has `-DLWS_WITH_GTK\u003d1`.\n-\n-## `lws_system` helper for attaching code to a single event loop from another thread\n-\n-`lws_system` ops struct now has a member that enables other threads (in the\n-same process) to request a callback they define from the lws event loop thread\n-context as soon as possible. From here, in the event loop thread context,\n-they can set up their lws functionality before returning and letting it\n-operate wholly from the lws event loop. The original thread calling the\n-api to request the callback returns immediately.\n-\n-## Improvements on tx credit\n-\n-H2 clients and servers can now modulate RX flow control on streams precisely,\n-ie, define the size of the first incoming data and hand out more tx credit\n-at timing of its choosing to throttle or completely quench the remote server\n-sending as it likes.\n-\n-The only RFC-compatible way to acheive this is set the initial tx credit to\n-0 and set it explicitly when sending the headers... client code can elect to\n-do this rather than automatically manage the credit by setting a new flag\n-LCCSCF_H2_MANUAL_RXFLOW and indicating the initial tx credit for that stream\n-in client connection info member manual_initial_tx_credit. A new public api\n-lws_wsi_tx_credit() allows dynamic get and add to local and estimated remote\n-peer credit for a connection. This api can be used without knowing if the\n-underlying connection is h2 or not.\n-\n-## `lws_system`: DHCP client\n-\n-DHCP client is now another network service that can be integrated into lws, with\n-`LWS_WITH_SYS_DHCP_CLIENT` at CMake. When enabled, the `lws_system` state\n-is held at `DHCP` until at least one registered network interface acquires a\n-usable set of DHCP information including ip, subnet mask, router / gateway\n-address and at least one DNS server.\n-\n-See the [api-test-dhcp](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/api-tests/api-test-dhcpc) Minimal Example for how to use.\n-\n-## UDP integration with `lws_retry`\n-\n-UDP support in lws has new helper that allow `lws_retry` to be applied for retry,\n-and the ability to synthesize rx and tx udp packetloss systemwide to confirm\n-retry strategies. Since multiple transactions may be in flight on one UDP\n-socket, the support relies on an `lws_sul` in the transaction object to manage\n-the transaction retries individually.\n-\n-See `READMEs/README.udp.md` for details.\n-\n-## `lws_system`: system state and notification handlers\n-\n-Lws now has the concept of systemwide state held in the context... this is to\n-manage that there may be multiple steps that need the network before it's possible\n-for the user code to operate normally. The steps defined are\n-\n-`CONTEXT_CREATED`, `INITIALIZED`, `IFACE_COLDPLUG`, `DHCP`, `TIME_VALID`, `POLICY_VALID`,\n-`REGISTERED`, `AUTH1`, `AUTH2`, `OPERATIONAL` and `POLICY_INVALID`. OPERATIONAL is the\n-state where user code can run normally.\n-\n-User and other parts of lws can hook notifier callbacks to receive and be able to\n-veto system state changes, either definitively or because they have been triggered\n-to perform a step asynchronously and will move the state on themselves when it\n-completes.\n-\n-By default just after context creation, lws attempts to move straight to OPERATIONAL.\n-If no notifier interecepts it, it will succeed to do that and operate in a\n-backwards-compatible way. Enabling various features like lws ntpclient also enable\n-notifiers that hold progress at the related state until their operation completes\n-successfully, eg, not able to enter `TIME_VALID` until ntpclient has the time.\n-\n-See `READMEs/README.lws_system.md` for details.\n-\n-## `lws_system`: HAL ops struct\n-\n-Lws allows you to define a standardized ops struct at context creation time so your\n-user code can get various information like device serial number without embedding\n-system-specific code throughout the user code. It can also perform some generic\n-functions like requesting a device reboot.\n-\n-See `READMEs/README.lws_system.md` for details.\n-\n-## `lws_system`: ntpclient\n-\n-Optional lws system service enabled by cmake `-DLWS_WITH_SYS_NTPCLIENT` intercepts\n-the `lws_system` `TIME_VALID` state and performs ntpclient to get the date and time\n-before entering `TIME_VALID`. This allows user code to validate tls certificates\n-correctly knowing the current date and time by the time it reached OPERATIONAL.\n-\n-## Connection Validity tracking\n-\n-Lws now allows you to apply a policy for how long a network connection may go\n-without seeing something on it that confirms it's still valid in the sense of\n-passing traffic cohernetly both ways. There's a global policy in the context\n-which defaults to 5m before it produces a PING if possible, and 5m10 before\n-the connection will be hung up, user code can override this in the context,\n-vhost (for server) and client connection info (for client).\n-\n-An api `lws_validity_confirmed(wsi)` is provided so user code can indicate\n-that it observed traffic that must mean the connection is passing traffic in\n-both directions to and from the peer. In the absence of these confirmations\n-lws will generate PINGs and take PONGs as the indication of validity.\n-\n-## `lws_system`: Async DNS support\n-\n-Master now provides optional Asynchronous (ie, nonblocking) recursive DNS resolving.\n-Enable with `-DLWS_WITH_SYS_ASYNC_DNS\u003d1` at cmake. This provides a quite\n-sophisticated ipv4 + ipv6 capable resolver that autodetects the dns server on\n-several platforms and operates a UDP socket to its port 53 to produce and parse DNS\n-packets from the event loop. And of course, it's extremely compact.\n-\n-It broadly follows the getaddrinfo style api, but instead of creating the results\n-on the heap for each caller, it caches a single result according to the TTL and\n-then provides refcounted const pointers to the cached result to callers. While\n-there are references on the cached result it can't be reaped.\n-\n-See `READMEs/README.async-dns.md` for detailed information on how it works, along\n-with `api-tests/api-test-async-dns` minimal example.\n-\n-## Detailed Latency\n-\n-You can now opt to measure and store us-resolution statistics on effective\n-latencies for client operations, and easily spool them to a file in a\n-format suitable for gnuplot, or handle in your own callback. Enable\n-`-DLWS_WITH_DETAILED_LATENCY\u003d1` in cmake to build it into lws. (NB 2021-01-12\n-this has been replaced by the lws_metrics support)\n-\n-If you are concerned about operation latency or potential blocking from\n-user code, or behaviour under load, or latency variability on specific\n-platforms, you can get real numbers on your platform using this.\n-\n-Timings for all aspects of events on connections are recorded, including\n-the time needed for name resolution, setting up the connection, tls\n-negotiation on both client and server sides, and each read and write.\n-\n-See `READMEs/README.detailed-latency.md` for how to use it.\n-\n-## Client connection logic rewrite\n-\n-Lws now makes much better use of the DNS results for ipv4 and ipv6... it\n-will iterate through them automatically making the best use it can of what's\n-provided and attempting new connections for each potentially usable one in turn\n-before giving up on the whole client connection attempt.\n-\n-If ipv6 is disabled at cmake it can only use A / ipv4 records, but if ipv6 is\n-enabled, it tries both; if only ipv6 is enabled it promotes ipv4 to\n-::ffff:1.2.3.4 IPv4-in-IPv6 addresses.\n-\n-## New network helpers for ipv4 and ipv6\n-\n-An internal union `lws_sockaddr46` that combines `struct sockaddr_in` and\n-`struct sockaddr_in6` is now public, and there are helpers that can parse (using\n-`lws_tokenize`) any valid numeric representation for ipv4 and ipv6 either\n-into byte arrays and lengths, or directly to and from `lws_sockaddr46`.\n-\n-## h2 long poll support\n-\n-Lws now supports the convention that half-closing an h2 http stream may make\n-the stream 'immortal', in terms of not being bound by normal timeouts. For\n-the client side, there's an api that can be applied to the client stream to\n-make it transition to this \u0022read-only\u0022 long poll mode.\n-\n-See `READMEs/README.h2-long-poll.md` for full details, including how to test\n-it with the minimal examples.\n-\n-## h1 client parser improvements\n-\n-H1 is not so simple to parse because the header length is not known until it\n-has been fully parsed. The next header, or http body may be directly coalesced\n-with the header as well. Lws has supported bulk h1 parsing from a buffer for a\n-long time, but on clientside due to interactions with http proxying it had\n-been stuck parsing the header bytewise out of the tls buffer. Now,\n-everything now bulk parses from a buffer and uses a buflist to pass leftovers\n-through the event loop cleanly.\n-\n-## `lws_sul` time refactor\n-\n-Just before v3.2 there was a big refactor about how lws handles time. It now\n-explicitly schedules anything that may happen in the future on a single, sorted\n-linked-list, at us resolution. When entering a poll wait (or returning to an\n-event lib loop) it checks the interval between now and the earliest event on the\n-list to figure out how long to wait if there are no network events. For the\n-event loop case, it sets a native event lib timer to enforce it.\n-\n-See `READMEs/README.lws_sul.md` for more details and a handy api where you can\n-schedule your own arbitrary callbacks using this system.\n-\n-## Master is now MIT-licensed\n+## Transition from master branch to main branch\n \n-Libwebsockets is now under the MIT license. See ./LICENSE.\n+The master-\u003emain branch transition happened several months ago, currently master is\n+still around as a mirror of main. master branch will go away some time before the\n+next release.\n \n ## Support\n \n","s":{"c":1750987385,"u": 2398}}
],"g": 3149,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "7d0a"}