curl-library
Re: Posting big files with libcurl
From: Mohun Biswas <m_biswas_at_mailinator.com>
Date: Wed, 29 Nov 2006 10:28:04 -0500
Date: Wed, 29 Nov 2006 10:28:04 -0500
Lepidosteus wrote:
> Second, if not, how can I do it ? (I don't see the buffer acting like
> a stream that I can "refill" when needed)
I would think you could solve this another way: mmap() the file and use
madvise() with MADV_SEQUENTIAL to tell the kernel each page will be read
only once, then give libcurl the starting address via CURLFORM_BUFFER.
This will cause it to (in essence) map a page, send the page, unmap the
page, and move to the next.
MB
Received on 2006-11-29