Deutsches LiveCode Wiki
Registrieren
Advertisement

Sets the timeout value for FTP transfers.

Syntax:

libURLSetFTPStopTime timeoutInSeconds

Examples:

libURLSetFTPStopTime 30 -- 30-second timeout
libURLSetFTPStopTime field "Timeout Value"

Use the libURLSetFTPStopTime command to increase the efficiency of multiple FTP transfers.

The timeoutInSeconds is a non-negative integer, or an expression that evaluates to a non-negative integer.

When LiveCode opens a socket to a host in order to upload or download a file via ftp, or to delete a file, it leaves the connection open for a time after the transaction completes. If another file is requested from the same FTP server during that time, LiveCode uses the same socket instead of opening another one. This saves time if you are transferring multiple files with the same server, since the socket does not need to be set up again for each file.

By default, the timeout value is 15 seconds.

If the server closes the connection, LiveCode does not attempt to keep it open. The timeout set by libURLSetFTPStopTime controls when LiveCode closes the connection from its end, but if the server closes the connection, a longer timeout has no effect.

The libURLSetFTPStopTime command is part of the Internet library. To ensure that the command works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the Standalone Application Settings window, make sure "Internet Library" is selected in the list of script libraries.

See: Internet library

See Also: get Command, libURLDownloadToFile Command, libURLftpUpload Command, libURLSetFTPMode Command, delete URL Command

Advertisement