[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Zero copy MHD_create_response_from_callback

From: Christian Grothoff
Subject: Re: [libmicrohttpd] Zero copy MHD_create_response_from_callback
Date: Fri, 18 Nov 2022 22:09:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0

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 callback. The data from
the driver isn't available immediately, so I check for the status inside of
the MHD_ContentReaderCallback and will suspend the connection if the next
64MB block isn't ready. When the next data block is ready I resume the
connection. Am I missing some way of doing that with
MHD_create_response_from_iovec? :)

Ah, I see: async generation PLUS iovec. Yep, that's indeed not (yet) possible. I don't see an issue with supporting this in principle, but it's simply not been implemented. If you have time to add it, I'm sure we'd accept a (well-written) patch ;-).

Happy hacking!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]