cURL / Mailing Lists / curl-library / Single Mail

curl-library

Data retrieval is fragmented using Multi CURL Lib

From: doa379 <doa379_at_gmail.com>
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.

Thanks!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-11-07