[libmicrohttpd] How to send Chunked messages

2018-11-28 Thread Santos Das
Hi, How can MHD send the chunked message to the client ? When a server receives a simple GET request, and the response is so large that it must be sent back using the "chunked" procedure. An example would be if a server received a file GET request, and the response is a large data file. Can you

Re: [libmicrohttpd] How to send Chunked messages

2018-11-28 Thread silvioprog
Hi Santos. I'm not sure if you want chunked transfer-encoding or something like byte serving (range requests). There is a small example showing how to send chunked data to the client here: https://gnunet.org/git/libmicrohttpd.git/tree/src/examples/chun

Re: [libmicrohttpd] How to send Chunked messages

2018-11-28 Thread Christian Grothoff
Dear Santos, MHD can send chunked response to the client. That said, this is not a question of how large the file is. Especially, if it is simply a very large file, MHD allows you to use sendfile() to avoid having a copy of the data in userspace. Chunked encoding is usually only used if the appli

Re: [libmicrohttpd] How to send Chunked messages

2018-11-28 Thread Santos Das
Thanks Christian. This is a great info. Regards, Santos On Wed, Nov 28, 2018 at 10:25 PM Christian Grothoff wrote: > Dear Santos, > > MHD can send chunked response to the client. That said, this is not a > question of how large the file is. Especially, if it is simply a very > large file, MHD a