1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00
Commit graph

21 commits

Author SHA1 Message Date
Andy Green
c9731c5f17 type comparisons: fixes
This is a huge patch that should be a global NOP.

For unix type platforms it enables -Wconversion to issue warnings (-> error)
for all automatic casts that seem less than ideal but are normally concealed
by the toolchain.

This is things like passing an int to a size_t argument.  Once enabled, I
went through all args on my default build (which build most things) and
tried to make the removed default cast explicit.

With that approach it neither change nor bloat the code, since it compiles
to whatever it was doing before, just with the casts made explicit... in a
few cases I changed some length args from int to size_t but largely left
the causes alone.

From now on, new code that is relying on less than ideal casting
will complain and nudge me to improve it by warnings.
2021-01-05 10:56:38 +00:00
Andy Green
962e9ee345 wip: ss c++ classes
C++ APIs wrapping SS client


These are intended to provide an experimental protocol-independent c++
api even more abstracted than secure streams, along the lines of
"wget -Omyfile https://example.com/thing"

WIP
2020-12-02 10:15:50 +00:00
Andy Green
d9f793ae12 logs: allow giving log bitfields from cmake to force build or exclusion
By default this doesn't change any existing logging behaviour at all.

But it allows you to define cmake options to force or force-disable the
build of individual log levels using new cmake option bitfields
LWS_LOGGING_BITFIELD_SET and LWS_LOGGING_BITFIELD_CLEAR.

Eg, -DLWS_LOGGING_BITFIELD_SET="(LLL_INFO)" can force INFO log level
built even in release mode.  -DLWS_LOGGING_BITFIELD_CLEAR="(LLL_NOTICE)"
will likewise remove NOTICE logging from the build regardless of
DEBUG or RELEASE mode.
2020-04-22 06:59:01 +01:00
Andy Green
28ce32af64 client: secure streams
Secure Streams is an optional layer on top of lws that separates policy
like endpoint selection and tls cert validation into a device JSON
policy document.

Code that wants to open a client connection just specifies a streamtype name,
and no longer deals with details like the endpoint, the protocol (!) or anything
else other than payloads and optionally generic metadata; the JSON policy
contains all the details for each streamtype.  h1, h2, ws and mqtt client
connections are supported.

Logical secure streams outlive any particular connection and supports "nailed-up"
connectivity regardless of underlying connection stability.
2020-03-04 12:17:49 +00:00
Andy Green
6a737b7ca6 lwsac: add lwsac_extend api 2020-02-21 17:32:41 +00:00
Andy Green
b2a112568c cov263975: help coverity see false positive 2019-11-12 10:28:53 +00:00
Andy Green
ce55c5dfe4 lwsac: fix header split optimization 2019-11-02 18:34:05 +00:00
Andy Green
ebdc0ad084 lwsac-backfill
Optimizations for memory-tight systems.

Check all previous gaps first for any usage, so gaps we created when
faced with perhaps a relatively large allocation that left a lot of
the last chunk on the table can be backfilled with smaller things as
it goes on.

Separate the members that only live in the head object out of the
buffer management object, reducing the cost of new chunks.  Allocate
the head object members as the first thing in the first chunk, and
adjust all the code to look there for them.
2019-10-17 09:19:57 +01:00
Andy Green
c776ac50d6 lwsac: add blob deduplication helper
Add lwsac helper api to allow user code to perform constant string folding
easily within an lwsac.  After isolating a string or blob that it wants to store in
the lwsac and point to, it can check if the string or blob already exists earlier
in the lwsac first, and if so just point to that without copying it in again.

For some formats with repeated strings like JSON, the saving can add up to
something useful.
2019-10-17 09:19:57 +01:00
Andy Green
6a6f365ce7 semmle: fix warnings
They're all cosmetic or minor js stuff.

Add related shield.io icons to README.
2019-09-22 09:35:07 -07:00
Andy Green
d7f0521aeb private.h: rename to contain dir
Having unique private header names is a requirement of a particular
platform build system it's desirable to work with
2019-08-15 10:49:52 +01:00
Andy Green
26319663f7 license: switch LGPLv2.1+SLE parts to MIT 2019-08-14 10:44:38 +01:00
Andy Green
38fb0e31da lws_struct
lws_struct JSON + sqlite3 serializer and deserializer


See READMEs/README.lws_struct.md
2019-04-06 06:08:47 +08:00
Andy Green
fd1f4e4de7 lwsac_use_zero 2019-03-29 05:03:01 +08:00
Andy Green
80ff6ed0df lwsac_use_zeroed: lwsac helper equivalent to zalloc 2019-03-12 11:57:43 +08:00
Andy Green
043700a4b0 optee: remove build system 2019-01-15 06:59:48 +08:00
Andy Green
531ad7ee2b minimal example deaddrop 2018-12-01 11:05:59 +08:00
Andy Green
30be5cb441 lwsac: unreference: allow to be called with NULL 2018-11-28 15:06:10 +08:00
Andy Green
9bed6d6fc6 clean: general whitespace cleanup 2018-11-23 08:47:56 +08:00
Andy Green
c027c3db28 docs: cleanups 2018-11-21 17:03:29 +08:00
Andy Green
a5b2248e72 lwsac
Introduce an api for efficiently dealing with allocations for
large, unknown amounts of objects.
2018-10-16 05:05:56 +08:00