Re: [libmicrohttpd] Zero copy MHD_create_response_from_callback

2022-11-18 Thread Christian Grothoff
On 11/17/22 20:34, Dan Inve wrote: Hi Christian, Sounds like you should be using MHD_create_response_from_iovec(). That way, you can avoid the memcpy() entirely. I took a look at MHD_create_response_from_iovec, but I'm not sure if that works for my circumstance because it doesn't use a cal

Re: [libmicrohttpd] Zero copy MHD_create_response_from_callback

2022-11-17 Thread Dan Inve
Hi Christian, Sounds like you should be using MHD_create_response_from_iovec(). That > way, you can avoid the memcpy() entirely. > I took a look at MHD_create_response_from_iovec, but I'm not sure if that works for my circumstance because it doesn't use a callback. The data from the driver isn't

Re: [libmicrohttpd] Zero copy MHD_create_response_from_callback

2022-11-17 Thread Christian Grothoff
Dear Dan, Sounds like you should be using MHD_create_response_from_iovec(). That way, you can avoid the memcpy() entirely. Happy hacking! Christian On 11/17/22 08:27, Dan Inve wrote: Hi, I'm using libmicrohttpd to respond to an HTTP request for a large amount of data (sometimes GBs) using

[libmicrohttpd] Zero copy MHD_create_response_from_callback

2022-11-17 Thread Dan Inve
Hi, I'm using libmicrohttpd to respond to an HTTP request for a large amount of data (sometimes GBs) using external select and MHD_create_response_from_callback with a known size. The data is sourced from hardware via a kernel driver. When the HTTP request is received, data is requested from the h

[libmicrohttpd] Zero copy MHD_create_response_from_callback

2022-11-17 Thread Dan Inve
Hi, I'm using libmicrohttpd to respond to an HTTP request for a large amount of data (sometimes GBs) using external select and MHD_create_response_from_callback with a known size. The data is sourced from hardware via a kernel driver. When the HTTP request is received, data is requested from the h