On Tue, 1 Apr 2014, Rich Gray wrote:
Seems to me that one way to go about more flexible buffering would be to make new versions of the read and write callback routines. If they were passed a struct containing at least the buffer address and count, then the callback could manipulate the buffers as desired for the next operation.
That sounds like a rather simple and yet elegant solution - I like it. Just make sure that libcurl has a buffer for the first callback time, then deliver back a new buffer+size for every time libcurl delivers data.
There would have to be a minimum size for that buffer that you'd give libcurl and you shouldn't assume that libcurl will actually fill it all up before it calls the callback with data but yeah, that would be a rather good way I think.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
