curl-library
Re: Problem in sending data to http server - threading
Date: Tue, 4 Sep 2012 10:33:18 -0700 (PDT)
I'm using libcurl version 7.27.0 on linux. All the curl related code runs in the same thread. As for the resolver method... I have no idea!
I've made the classes into an executable - and it behaves the same way so it's not related to the chat server code itself. The code and exec are is in attachement. Plz do not make this code public. It may not be beautiful, but I do have a contract with my employer. =)
Now if you have the same kind of output as I do, I'll know something is wrong with the code...
Adam
Date: Sat, 1 Sep 2012 20:34:02 +0200 (CEST)
From: Daniel Stenberg <daniel_at_haxx.se>
To: adam galarneau <machoman81_1_at_yahoo.com>, libcurl development
<curl-library_at_cool.haxx.se>
Subject: Re: Problem in sending data to http server - threading
related?
Message-ID: <alpine.DEB.2.00.1209012027190.8158_at_tvnag.unkk.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Fri, 31 Aug 2012, adam galarneau wrote:
> I'm having problems sending data through curl to an http server. When trying
> to send 50 requests in one iteration, the data is sent in bursts (4-5
> requests send every 3 seconds or so). I was able to remove the problem by
> adding a sleep in between sending requests AND processing the messages for
> all the handles in between each RequestFiltering but that's not a
> solution... RequestFiltering and ReadMessages' code is shown below.
First, it would be MUCH easier if you sent us a complete source code we can
run in our ends to see the problem. And we could read the code and understand
what it does. I find it very hard to follow
your shown code flow.
Secondly, you're not saying which libcurl version or which operating system
you're using. These details matter to us.
The multi handle does not use threads to do multiple simultaneous transfers,
so it isn't likely to be thread related unless you add threads to the mix. Do
you?
Lastly, libcurl can be built with different resolver backends and when using
the multi interface that choice can have a real effect - mostly if you're
using the stock blocking resolver. Which resolver method are you using?
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- application/zip attachment: ChatFilterProcessor.zip