libURLSetFTPStopTime

Sarah Reichelt sarah.reichelt at gmail.com
Thu Nov 15 15:53:52 EST 2007


> > However I find that if I am transferring lots of files, that Rev opens
> > a new connection for each file regardless and I rapidly get to a stage
> > where the server is rejecting my commands because I have too many
> > connections open.
>
> Quick response:
>
> Are you doing anything that might close the socket used after each
> transfer? This would cause a new session to be opened with the
> server, while the server might see the previous session as still
> being open.

Not that I know of. I use a libURLftpUploadFile or
libURLDownloadToFile command with a callback. During the transfer I
monitor the URLstatus. In the callback, I check the status again and
it the status is "uploaded" or "downloaded", I just go on to issue the
next libURLftpUploadFile or libURLDownloadToFile command.

> Are you checking for errors after each download? An error would cause
> libUrl to close the socket, which might result in what you are seeing.

Yes, I check for errors after every transfer. If I encounter an error
then I stop the process myself.

> Decreasing the stop time as you did causes the session to close
> cleanly (using the QUIT command) which will keep the server happy.
> However, you shouldn't have to do this.

Yes, it woould be neater if the same connection could be kept open,
however I have got a workable solution now.

Thanks for the quick response,
Sarah



More information about the use-livecode mailing list