FTP and SocketTime Out?

Andre Garzia soapdog at mac.com
Tue Apr 18 12:30:58 EDT 2006


John,

Hi there! :-)

Maybe switching from passive connection to active connection will  
help, some server behaves better using active connections.

Try inserting this before any FTP command in your script

LibURLSetFTPMode "active"

get back to us after that! :D

Cheers
andre




On Apr 18, 2006, at 1:22 PM, John Patten wrote:

> Thanks for tips Alex...
>
> I went ahead and ping'd the servers. By IP the pings are all good  
> times (3ms). However, FTP clients are also very slow in their  
> initial connecion too.
>
> I do have access to another Mac FTP server. I noticed when I  
> connect by domain name, it errors out with a "500 Connection  
> refused (Winsock error #10061)."  However, IP address will work but  
> only after the long connection.
>
> The script I'm using in my stack is lifted from, I believe, one of  
> Andre's examples.
>
> Here it is:
>
> --------------------------------------------------
> on mouseUp
>   put "ftp://ftpUser:ftppassword@10.58.1.7/Users/ftpuser/Sites/ 
> ftpusersite/" into tServer
>
> --Here's where I had to put the socket interval. I didn't even set  
> the timeout interval before.
> set the socketTimeoutInterval to 100000
>
>   libURLSetFTPListCommand "NLST"
>
>   put URL tServer into tData
>   replace crlf with cr in tData
>   replace lf with cr in tData
>
>
>
>
>   libURLSetFTPListCommand "LIST"
>   put URL tServer into tLongData
>
>   repeat with x = 1 to the number of lines of tData
>     get line x of tData
>     get lineoffset(it, tLongData)
>     if char 1 of line it of tLongData is "d" or char 1 of line x of  
> tLongData is "1" then
>       put line x of tData & cr after theMenuItems
>     else
>       end if
>   end repeat
>
>   put theMenuItems into button "country"
>   Set the label of cd btn "Country" to "Country"
>   show button "Country"
> end mouseUp
>




More information about the use-livecode mailing list