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

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
-----------------------------------------------------------------------