cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Data transfer on libcurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 17 Aug 2009 15:45:10 +0200 (CEST)

On Mon, 17 Aug 2009, Nir Finkel wrote:

> What I means is when I provide libcurl pointer to a buffer and a content
> length. Is the data sent straight to the socket or constructed and then
> written to socket?

You don't actually "provide libcurl pointer to a buffer". In the case where
you use libcurl to upload data to a remote server, libcurl calls your read
callback and then you _copy_ data to libcurl's buffer.

Then libcurl will call send() (or equivalent) to send the data from that
buffer to the network layer of your OS.

Honestly, I think you're looking for answers to something that shouldn't be
asked (since the question is so confused). Instead you should ask whoever
wants this answer what the heck they're REALLY want to know. Then we can
proceed and talk about that.

-- 
  / daniel.haxx.se
Received on 2009-08-17