CuteFTP Professional User s Guide
N
O TIMEOUT WHEN CONNECTING TO AN UNAVAILABLE HOST
If the Transfer Engine s Connection method refuses to timeout when connecting to a non
existing or temporarily unavailable host, try setting the throw error to true. The Connection
method does not have a built in timeout value. It will keep trying to connect indefinitely.
Because the event is synchronous, subsequent lines in the script, including conditional
statements for determining the connection status of the TE, never get called.
:
Examples
A few possible workarounds, and help for accepting and rejecting certificates:
MySite.Option("AutoCloseMethod") = 2 1 auto accept, 2
auto reject, 0 default no auto
MySite.Option("AutoCloseDelay") = 12 default value is
60 sec
Set Option("AutoCloseMethod") property to 1 or 2 in order
for script can continue its processing:
MySite.Option("AutoCloseMethod") = 1 will auto accept
cert and continue
MySite.Option("AutoCloseMethod") = 2 will auto reject
cert a
nd finish with error
M S
y ite.Option("AutoCloseMethod") = 0 default: will not
close prompt on timeout
T
IMEOUT STRATEGIES FOR THE
W
AIT METHOD
The default timeout value for the Wait method is 21,805,184 milliseconds, whic
h is
approximately 6 hours. The timeout value is a SIGNED LONG data type, meaning its
maximum possible value is 2,147,483,647 milliseconds, which is roughly 596.5 hours or j ust
under 25 days. This is probably enough time for even the slowest transfer.
The Wait method supports a "0" timeout value which means "keep waiting forever or unt li
the transfer reaches a state of CANCELED, FINISHED, ERROR, SUSPENDED,
SKIPPED, or BLOCKED."
You c n
a also write scripts so that they check the condition of a transfer and if it is still in the
"TRANSFERRING" state, to wait on it again.
Three timeout strategies for long transfer tasks
1.
Specify a large timeout value in the script call Because the first parameter to
the Wait method is a task index, this example use
s a " 1" which means "current
task." For this example, the timeout is
60 * 60 * 1000 =
set for 10 hours or, 10 *
36000000 milliseconds.
Example
strResult = strataFTP.
Wait( 1, 36000000 )
234
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved