cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: minimizing curl data callback

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 17 Jun 2011 23:59:19 +0200 (CEST)

On Fri, 17 Jun 2011, Sagar Zaveri wrote:

> I have set the buffer size as 16K (Max. that curl allows). However i do get
> 40% of callbacks with data lesser than 16K. Is there any way I can reduce
> number of data calls?

First, you're clearly talking libcurl details here so you are much better off
on the curl-library mailing list. This list is for the curl command line tool.

But to answer the question: libcurl will call the callback as soon as it has
received data, so as long as libcurl reads smaller data amounts from the
socket the callback will gets smaller data chunks.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-06-18