mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
![]() This provides very memory-efficient CBOR stream parsing and writing. The parser converts pieces of CBOR into callbacks that define the structure and collate string and blobs into buffer chunks for extensible and easy access. It is fragementation-safe and does not need all the CBOR in the same place at one time, chunks of CBOR are parsed and discarded as provided. It does not allocate and just needs a few hundred bytes of stack for even huge CBOR objects. Huge strings and blobs are handled without needing memory to hold them atomically. Includes ./minimal-examples/api-tests/api-test-lecp that unit tests it against 82 official example CBORs and 26 additional test vectors from COSE (just checking the CBOR parsing). The writing apis allow printf style semantics with a variety of CBOR-aware %-formats. The apis write into a context that manages output buffer usage, if the output buffer fills, then the apis return with an AGAIN code that lets you issue and reset the output buffer and repeat the api all to issue more output. The subsequent calls can occur much later or from a different function context, so this is perfect for WRITEABLE-mediated output from the network parts of lws. See ./READMEs/README.cbor-lecp.md |
||
---|---|---|
.. | ||
android | ||
private | ||
1.png | ||
2.png | ||
3.png | ||
4.png | ||
5.png | ||
6.png | ||
7.png | ||
8.png | ||
candide-uncompressed.zip | ||
candide.zip | ||
CMakeLists.txt | ||
favicon.ico | ||
http2.png | ||
leaf.jpg | ||
libwebsockets-test-server.service | ||
libwebsockets.org-logo.png | ||
libwebsockets.org-logo.svg | ||
lws-cgi-test.sh | ||
lws-common.js | ||
lws-ssh-test-keys | ||
lws-ssh-test-keys.pub | ||
test-client.c | ||
test-lecp.c | ||
test-lejp.c | ||
test-server.c | ||
test-sshd.c | ||
test.css | ||
test.html | ||
test.js | ||
wss-over-h2.png |