Allow this kind of pattern for context creation info preparation
struct lws_context_creation_info info;
lws_context_info_defaults(&info, policy);
info.default_loglevel = LLL_USER | LLL_ERR | LLL_WARN;
lws_cmdline_option_handle_builtin(argc, argv, &info);
Calling lws_context_info_defaults() zeros down and prepares boilerplate in
the info struct, setting the default_loglevel asserts your application
default for the loglevel and then lws_cmdline_option_handle_builtin() will
set either that default loglevel, or override it from the commandline with
-d 1039 etc
Provide a way to apply exception mount urls that exist on top of a larger
mount, but provide an exception which enforces the url to not be serviced
by the mount code, but by whatever dynamic handler is in place.
Long story, there's also minimal example to take care of.
This change should take care of anything with ETHER_ADDR_LEN in
net/ethernet.h plus windows, for both the lib and example.
Introduce a LWS_WITH_WOL and an api to wake a mac address, optionally with
an address bind to the local interface to go out on.
Add a helper to parse ascii mac addresses well, and add tests.
Also thanks to OgreTransporter
https://github.com/warmcat/libwebsockets/issues/3016
When a server is set to listen to a unix domain socket, i.e. options
field of struct lws_context_creation_info has the
LWS_SERVER_OPTION_UNIX_SOCK flag set, the port must be set do zero,
otherwise the unix socket is never created.
Linux has a sockopt flag defined by RFC5014 that informs IPv6 systems with
SLAAC config to prefer to bind the socket to a public address instead of
any temporary private address.
This patch adds a client info flag LCCSCF_IPV6_PREFER_PUBLIC_ADDR that lets
the user indicate the client socket should be prepared with the public
address binding preference.
Currently it's only implemented on Linux.
When a certificate for a TLS connection is provided, but a private
key is not, the SSL_CTX initialization exits early, before the
CONTEXT_REQUIRES_PRIVATE_KEY callback can be issued.
Remove the now obsolete callback and update the vhost
field description to state that the LOAD_EXTRA_SERVER_VERIFY_CERTS
callback should be used instead.
Add a dlo-based layout callback for use with lhp.
If lhp_dl_render() is used as the Lws Html/CSS parser callback, it
produces a display_list representation of the Html as DLOs, referencing the
appropriate CSS to drive the layout as best it can.
The display list can be rasterized on to an lws_display using the display's
state object
lds->disp->blit(lds, (uint8_t *)&dl, &box);
Introduce a very lightweight html5 + css2.1+ stateful stream parser, along
the same lines as the lws json and cbor ones.
This is interesting primarily because of just how low-resource it is for
modest css + html, it uses an lwsac to hold the entirity of the css in
memory at once but the html is parsed in chunks without any need to keep
previous chunks around (chunks may be as small as 1 byte).
A user callback receives element entry and exit callbacks with payload and
all attributes parsed out, CSS related to the active element stack is
parsed to provide a list of active css attributes, which takes heap for the
duration of the parsing.
In effect this provides rich information about the html and css state to
the callback, which has the job of producing the layout in a user-defined
way.
As such, there is no DOM in memory at one time, there is only a stack of
active elements like <html><body><div>xxx with their associated attributes
(like class). So as it is, it does not support DOM modification such as
JS changing elements after parsing, although elements with interesting IDs
could be kept around by the callback. There is a corresponding tiny and
relatively flat heap usage regardless of html size.
Default CSS is specified as recommended in the CSS 2.1 standard.
Inline <style></style> elements are supported, but not pre-html5 style= in
element attributes, since these are incompatible with strict CSP.
What the attributes should mean on your system, eg, font-size, font-family
etc is left for the user callback to decide, along with how to lay out the
items using the CSS attributes, and render them.
Fixed point 32.32 constants are used (fraction expressed at parts in 100M)
instead of floating point.
If you have presentation needs, even on a constrained display on a
constrained microcontroller, this makes it feasible to use standardized
markup and styling instead of roll your own.
Add EXPECT_MORE flag to indicate that running out of input is not (yet)
indicating the end of the document. The caller should remove this flag
when it identifies that it does not have the chunk with the end of the
document: the last chunk may be zero length.
Track line numbers so the caller can infer CR, absorb CRLF -> CR.
Also add COLON_NONTERM needed for ipv6 literal addresses.
This is the SPI client chip in the LCD displays on ESP32 WROVER-KIT and S2
Kaluga.
Adapt it to allocate using DMA-able allocators and to use the new blit op
conventions for update sequencing
This provides an alternative esp32-specific SPI driver with ops that can be
swapped in place of the gpio bitbang one.
The pinmux info and lws gpio driver and other data in the spi bitbang
struct are used as-is by the DMA one.
New ops are provided which are able to allocate and free DMA-able memory so
the device drivers can prepare directly usable buffers. Bounce through to
DMA-able buffers is also transparently supported.
This adds an optional lws VFS layer that exposes the named dlo object
registry. So you can register a blob like a JPG named "my.jpg", and
access it on the vfs as, eg, /dlofs/my.jpg (or file:///dlofs/my.jpg
if using the SS file:// support for VFS namespace).