[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FTPAPI & timeout




I agree with this.  Chances are slim that after a 'fair' amount of time (1-2 minutes perhaps?) that a connection will be established if one was not established right off the bat.  Having a default timeout to be used if one is not specified would make sense.



Christian <chrisv5@xxxxxx>
Sent by: owner-ftpapi@xxxxxxxxxxxxx

06/25/2006 05:32 AM

Please respond to
ftpapi@xxxxxxxxxxxxx

To
ftpapi@xxxxxxxxxxxxx
cc
Subject
FTPAPI & timeout





Sender: Christian <chrisv5@xxxxxx>

I have a very bad feeling about the possibility to omit a timeout in
FTPAPI. This will just cause the program to hang forever, if the server
is down (or does not even exist!!), the Internet connection is down, etc.

IMHO blocking sockets only make sense in a threaded environment where it
does not matter if a child thread hangs forever as long as the main
thread remains responsive.

I propose the change of FTPAPI to always use non-blocking sockets,
regardless if there has been a timeout requested or not, with using a
default timeout (suggestions?) in case none was provided.

This is not only a lot more sensible (who on Earth wants a program to
wait a couple of hours, or even forever, for a connection to be
established, data being sent/received?), it also would make the code a
lot cleaner.

Regards,
Christian
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------