cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: issue with curl_multi_timeout while doing non-blocking HTTP posts in VMS

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 27 Jul 2007 23:20:17 +0200 (CEST)

On Fri, 27 Jul 2007, Sudarshan Raghunathan wrote:

> I am having some trouble with the curl_multi_timeout function return value.
> My understanding is that this function should return the the max time for
> which the app must wait before proceeding. However, the value returned by
> this function seems really huge - around 300 seconds!

It will be "around 300 seconds" at times, and it will be other values other
times (depending on the exact situation, options set and how libcurl was
built). Why is 300 seconds that bad in your particular case?

Your code seems to assume that the timeout is a time that your client can
simply wait, but the timeout is a (tadaa) *timeout* which means that it is the
longest time you should wait for socket action until you proceed anyway.
Longest. It means that as soon as you get socket action you should proceed,
even if the timeout time hasn't been reached.

If you have any suggestions on what to add to the man pages to make this
clearer, please let us know!

> I am attempting to do a non-blocking HTTP post in Open VMS using curl 7.16.2.
> Am I using this call correctly? (note: I don't want to use the select
> mechanism for checking socket activity).

You DON'T want to use select()? Then what do you want to use? If you use
curl_multi_perform() you're pretty much forced to use select(), but if you use
curl_multi_socket*() you can pick another method of your choice.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-07-27