aboutsummaryrefslogtreecommitdiff
path: root/lib/abstract
AgeCommit message (Collapse)Author
2021-05-04license: fix two old headers from pre-MIT changeAndy Green
These two headers managed to avoid the global switch from LGPL2.1 -> MIT back in the day, correct them to be aligned with the rest of lws' own license, ie, MIT.
2020-05-27cmakelist: Augean Stables refactorAndy Green
Establish a new distributed CMake architecture with CMake code related to a source directory moving to be in the subdir in its own CMakeLists.txt. In particular, there's now one in ./lib which calls through to ones further down the directory tree like ./lib/plat/xxx, ./lib/roles/xxx etc. This cuts the main CMakelists.txt from 98KB -> 33KB, about a 66% reduction, and it's much easier to maintain sub-CMakeLists.txt that are in the same directory as the sources they manage, and conceal all the details that that level. Child CMakelists.txt become responsible for: - include_directories() definition (this is not supported by CMake directly, it passes it back up via PARENT_SCOPE vars in helper macros) - Addition child CMakeLists.txt inclusion, for example toplevel -> role -> role subdir - Source file addition to the build - Dependent library path resolution... this is now a private thing in the child CMakeLists.txt, it just passes back any adaptations to include_directories() and the LIB_LIST without filling the parent namespace with the details
2020-01-05cleaningAndy Green
2019-11-04format strings: ban %.*s as some platforms lack itAndy Green
The %.*s is very handy to print strings where you have a length, but there is no NUL termination. It's quite widely supported but at least one vendor RTOS toolchain doesn't have it. Since there aren't that many uses of it yet, audit all uses and convert to a new helper lws_strnncpy() which uses the smaller of two lengths.
2019-10-10abstract: existing connection compareAndy Green
2019-10-10muxable client: make http support genericAndy Green
h1 and h2 has a bunch of code supporting autobinding outgoing client connections to be streams in, or queued as pipelined on, the same / existing single network connection, if it's to the same endpoint. Adapt this http-specific code and active connection tracking to be usable for generic muxable protocols the same way.
2019-08-26freertos: rename esp32 plat to freertosAndy Green
2019-08-26clean: internally use LWS_WITH_CLIENT and _SERVERAndy Green
Remove some more things in LWS_WITH_SERVER=0 case
2019-08-15private.h: rename to contain dirAndy Green
Having unique private header names is a requirement of a particular platform build system it's desirable to work with
2019-08-14license: switch LGPLv2.1+SLE parts to MITAndy Green
2019-08-08sequencer: upgrade timeout to use usAndy Green
Adapt service loops and event libs to use microsecond waits internally, for hrtimer and sequencer. Reduce granularity according to platform / event lib wait. Add a helper so there's a single place to extend it.
2019-08-08sequencer: add second aux message argAndy Green
Since the messages are queued and then read in order from the event loop thread, it's not generally safe to pass pointers to argument structs, since there's no guarantee the lifetime of the thing sending the message lasted until the sequencer read the message. This puts pressure on the single void * argument-passed-as-value... this patch adds a second void * argument-passed-as-value so it's more possible to put what's needed directly in the argument. It's also possible to alloc the argument on the heap and have the sequencer callback free it after it has read it.
2019-08-05lws_retry_bo_t: generic retry backoffAndy Green
Add a generic table-based backoff scheme and a helper to track the try count and calculate the next delay in ms. Allow lws_sequencer_t to be given one of these at creation time... since the number of creation args is getting a bit too much convert that to an info struct at the same time.
2019-07-22lws_sequencer_t: allow wsi bindingAndy Green
2019-06-29unit test sequencerAndy Green
2019-06-26abstract: allow completely generic instantiation and destructionAndy Green
2019-06-19abstract: add abstract transport tokensAndy Green
SMTP was improved to use the new abstract stuff a while ago, but it was only implemented with raw socket abstract transport, and a couple of 'api cheats' remained passing network information for the peer connection through the supposedly abstract apis. This patch adds a flexible generic token array to supply abstract transport-specific information through the abstract apis, removing the network information from the abstract connect() op. The SMTP minimal example is modified to use this new method to pass the network information. The abstract transport struct was opaque, but there are real uses to override it in user code, so this patch also makes it part of the public abi.
2019-05-04smtp: make abstractAndy Green