cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Timeout Behavior for Curl TFTP

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 5 Jan 2009 23:07:23 +0100 (CET)

On Mon, 5 Jan 2009, Grant Erickson wrote:

> I have noticed for TFTP that the connect-timeout, max-time and limit-rate
> options do not work as expected. Conducting the following on the host and
> target systems.

[...]

> Is this "as-designed" behavior for TFTP or is this in error and in need of a
> fix-up? For HTTP, these options behave correctly (or at least as I expect
> they would).

I can't see any reasonable explanation to why it would work like this. I think
these are plain bugs, and I think they are present primarily due to two
reasons: TFTP is UDP and not a lot other stuff in libcurl is, and the transfer
loop for TFTP is made outside of the regular transfer loop so it has its own
set of flaws/logic.

Hopefully Chad Monroe's work will adjust both areas, but I'm sure your added
work and input will be useful as well!

> While TFTP is not a connection-oriented (i.e. TCP) implementation making the
> connect-timeout option somewhat ambiguous, my expectation is that
> connect-timeout option would control the first sendto/recvfrom to/from the
> server and max-time would control the entire transaction. If there's
> agreement, I'll proceed with a patch.

That sounds entirely reasonable to me. I think that the documentation for the
connect time-out should get that little clarfication added once this ges
fixed, as a connect time-out is indeed a weird concept for UDP.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-01-05