[Libwebsockets] Libwebsockets Trouble with chunked file transfering

Serega Dzivickiy seregadzivickiy2015 at gmail.com
Fri Jun 12 10:43:44 CEST 2020

Hi! I'm using your library libwebsockets for my project. I wanna send
chunked files via HTTP, because I don't know Content-Length in advance. I
read about protocol Transfer-Encoding Chunked, but in your library
realisation I didn't find a function which can transfer files with
Transfer-Encoding chunked. Also I'm trying to transfer files specifying the
size in advance, but it didn't work out. I saw in your library a function
named lws_serve_http_file, but I cannot use this function because I haven't
file, in my task I wanna transfer bytes chunks for example 1024 byte one
packet. And the browser must download these chunks and create one file from
these chunks. I tried many methods but I didn't  succeed. Below I will
attach examples of my code implementation, could you please review, maybe
I"m doing something wrong? Or maybe I don't know some specific function in
your library. Thank you for understanding. Waiting for your reply.
Regards, Sergei !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200612/ca7e8754/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chunked file transfering.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 310482 bytes
Desc: not available
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200612/ca7e8754/attachment-0001.docx>

More information about the Libwebsockets mailing list