[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FTPAPI question
Sender: Christian <chrisv5@xxxxxx>
Scott Klement wrote:
Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>
Another situation is where people will "poll" for files on FTP servers.
They'll have an RPG program that's using FTPAPI to connect to FTP
servers on each of their branch offices. The RPG program then cycles
through the different connections, doing an FTP_list() on each
connection to see if there's any files to download. Since it calls
FTP_list() every second or so for each office, timeouts aren't usually a
problem.
Ahh... that makes perfect sense to me!
All of the FTP clients that I've seen that have any sort of "timeout"
controls merely send a SITE command to the server with the new timeout
value. Is this what you're referring to? If so, it can be easily done
with FTPAPI using FTP_quote().
Well, not really... while you are downloading a large file over a slow
connection, you are stuck and cannot do anything (well, I guess that is
where the callbacks come in?). I never looked into the callback stuff,
but that might just work!
There's no need for making them threadsafe. RPG is not a threadsafe
language. The compiler generates code (that the programmer has no
control over) that's not threadsafe. The only way RPG it can safely be
used in a multi-threaded environment is to have THREAD(*SERIALIZE) on
the H-spec, and since this causes it to be serialized, you'll never have
multiple threads running at once in an RPG program.
Thanks for the insight. I'll leave it just as it is then.
Regards,
Christian
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------