cURL / Mailing Lists / curl-library / Single Mail


Re: write callback issues (was Re: A new problem)

From: Linus Nielsen Feltzing <>
Date: Tue, 08 Apr 2008 07:45:28 +0200

Prasad J Pandit wrote:
> My guess is, libcurl does not read entire data bytes from the socket in
> one call, and those remaining bytes is what I receive in the second one;
> or something like that...or does it have anything to do with
> multi-threading?.

Curl will read the data as it arrives, and you are never guaranteed that
the entire response will be read in one go. The callback must be able to
handle fragmented responses.

Yes, multithreading may be an issue if your global Curldata pointer is
shared with other threads.

Received on 2008-04-08