cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Sleeping before Multiperform returns a magic number

From: A. Craig West <acraigwest_at_gmail.com>
Date: Wed, 15 Jul 2009 11:11:17 -0400

2009/7/15 <centrio_at_gmail.com>:
> Hi,
> My application, after it connects to 'http URL' successfully, sleeps for
> 60sec before i do a first multiperform.
> During this time, server will be pushing data continuosly which might exceed
> curl's CURL_MAX_WRITE_SIZE(16384)bytes.
>
> When i do multipeform (in a while(1) loop ) after this 60sec interval, i see
> curl returns bytes in this order : 16384, 16384,
> 1448,1448,1448,1448,1448,1448....
>
> I want to know what's this '1448' magic number.
> please help.

It seems likely, from your description, that 1448 is the number of
bytes the server is sending in one transaction. If the server isn't
flushing it's stream, it is probably the number of data bytes in one
network packet, after whatever headers there are, although it could
possibly be the number of bytes the server sends in the time it takes
for your code to process one batch of data (about 3 seconds,
apparently)
-Craig
Received on 2009-07-15