File transferring

Dave Cragg dave.cragg at lacscentre.co.uk
Fri Mar 2 10:24:00 EST 2007


On 2 Mar 2007, at 14:55, Richard Miller wrote:
> Let's say our Rev app requests a file from the server (via a  
> wireless connection). It does this via "put url x into z".
>
> 1) The server gets the request and attempts to send the file back,  
> but the wireless connection drops out. How long does the "put"  
> command wait for a response and what should the program do if  
> nothing comes back? Also, what is the server's response to trying  
> to send the file but not being successful due to the bad connection?
>
> 2) Alternately, what happens if the program tries to send the "put"  
> command but the connection goes down then (i.e. it never reaches  
> the server)? How should the program respond then?

Richard, is this FTP file transfer, or a regualar file server?

If it's FTP ...

I'm going to assume losing a wireless connection is the same as  
losing a normal wired connection (same effect as pulling out the LAN  
cable). Someone correct me if I'm wrong.

If that's the case, 2 situations:

1.  The connection is down before making the request. In this case,  
you should get an immediate error in "the result" when you make the  
"put  ... into url ..." or "get url" request.

2.  If it goes down during the transfer, I'm seeing a socketTimeout  
error here, so it's not immeditae. This surprised me as I expected a  
socketError. (This is on OS X)

I'd expect something similar for regular file transfers.


>
> And finally, is there any good / sane reason to use LibURLResetAll  
> in the standalone or is that just looking for trouble.

I'd avoid it if you can. I've never included it in a standalone.

Cheers
Dave



More information about the use-livecode mailing list