cURL / Mailing Lists / curl-library / Single Mail


Data retrieval is fragmented using Multi CURL Lib

From: doa379 <>
Date: Sat, 07 Nov 2015 00:22:10 +0000

I am using multi libcurl to download data from various sources. It's all
working except for the issue that the data retrieved from the various
sources is fragmented and jumbled. For example if you have this JSON
data in any order:

{{ JSON1 }, { JSON2 }, { JSON3 }}
{{ JSON1 }, { JSON3 }, { JSON2 }}
{{ JSON2 }, { JSON1 }, { JSON3 }}

it may appear in the resulting stream like this:

{{ JSON1, { JSON3 }}, { JSON2 }}

All the data is successfully downloaded but just in the wrong order. As
it makes parsing the data difficult I would like to resolve this issue.

The data is coming in from the servers at close to the same time and the
stream variable is filled in as the data arrives. Is there a way to get
JSONX datum one at a time whilst still using the multi libcurl (eg.
restricted connection)?

This could be done manually through multiple curl_easy functions but I
would like to continue using the multi features of getting the data in
one go albeit without fragmentation.

Any suggestions greatly appreciated.

List admin:
Received on 2015-11-07