[Libwebsockets] v2.4 released
andy at warmcat.com
Tue Oct 17 20:29:57 CEST 2017
On October 17, 2017 10:57:09 PM GMT+08:00, Shmuel Weiss <sweiss at kramerel.com> wrote:
>Thanks Andy great news !
>A quick and short question about POST_URI.
>We saw that in the Body we get all the POST data into *in into the
>Can we assume that ALL the data is there or can the request be
>fragmented and arrive into chunk until the COMPLETION?
Lws approach to any incoming bulk data is pass it through to the user callback as it comes. So depending on network conditions you may get the body arbitrarily fragmented, even 1 byte per callback.
For POST body parsing including file upload support lws provides a bytewise parser that's usually what you want
this is immune to fragmentation and brings out form arguments and bulk file data from the bost body. Look at the post demo protocol to see how to use
>From: Libwebsockets [mailto:libwebsockets-bounces at ml.libwebsockets.org]
>On Behalf Of Andy Green
>Sent: Monday, October 16, 2017 4:13 PM
>To: libwebsockets at ml.libwebsockets.
>Subject: [Libwebsockets] v2.4 released
>Thanks to everyone who contributed.
>- HTTP/2 server support is now mature and usable! LWS_WITH_HTTP2=1
>enables it. Uses ALPN to serve HTTP/2, HTTP/1 and ws[s] connections
>all from the same listen port seamlessly. (Requires ALPN-capable
>1.1 or mbedTLS).
>- LWS_WITH_MBEDTLS=1 at CMake now builds and works against mbedTLS
>instead of OpenSSL. Most things work identically, although on common
>targets where OpenSSL has acceleration, mbedTLS is many times slower in
>operation. However it is a lot smaller codewise.
>- Generic hash apis introduced that work the same on mbedTLS or OpenSSL
>- LWS_WITH_PEER_LIMITS tracks IPs across all vhosts and allows
>restrictions on both the number of simultaneous connections and wsi in
>use for any single IP
> - lws_ring apis provide a generic single- or multi-tail ringbuffer...
>mirror protocol now uses this. Features include ring elements may be
>sized to fit structs in the ringbuffer, callback when no tail any
>longer needs an element and it can be deleted, and zerocopy options to
>write new members directly into the ringbuffer, and use the ringbuffer
>element by address too.
>- abstract ssh 2 server plugin included, with both plugin and
>standalone demos provided. You can bind the plugin to a vhost and also
>serve full-strength ssh from the vhost. IO from the ssh server is
>controlled by an "ops" struct of callbacks for tx, rx, auth etc.
> - Many fixes, cleanups, source refactors and other improvements.
> - Valgrind + Coverity -clean.
>https://libwebsockets.org is running
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
More information about the Libwebsockets