cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to separate two different response

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 18 May 2016 14:57:31 -0400

On 5/18/2016 8:32 AM, Daniel Stenberg wrote:
> On Wed, 18 May 2016, smruti kumari wrote:
>
>> Let's consider I have two enpoints E1, E2 and one server. E1 send a
>> request to server and server forward to E2. E2 gives two responses to
>> E1 via server.If these two response come together(one after another)
>> then how can I separte it these two response since it's a stream?
>
> You have two transfers. E1 and E2. Then send and receive data. When
> the write callback is invoked by libcurl, they get the pointer set
> with CURLOPT_WRITEDATA passed to it as well. You can use that to pass
> in whatever data you want to help your function figure out which
> transfer the data belongs to.
>

I'm not sure this is what Smruti means. How are you using libcurl
Smruti? Which protocol are you using? You will have to provide more
details. To disambiguate this forget about endpoints and let's think in
terms of client and server, client speaks first, server replies. He is
E1 client with libcurl. E1 sends request to server. The question is
about E2 and server, is E2 a client running libcurl? It doesn't sound
like it.
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-18