in reply to Re: Net::FTP Timeout
in thread Net::FTP Timeout
Thanks for your reply. I have a question in reference to your first paragraph regarding the nature of socket creation: Is a socket created only uppon connection, or is it done continually throughout the connection?
I ran a little test where I began a connection, and started a file transfer:$ftp_a = Net::FTP->new($remhostname, Timeout => 120, Debug => 1) || &error && die "Cant connect to $remhostname\n"; $ftp_a->login ($remusername,$rempassword) || &error && die "Cant login to $remhostname\n"; $ftp_a->binary (); $ftp_a->cwd ("$home\/$fpath") || warn "Cant find Directory $home/$fpath\n"; $ftp_a->get("$fname") or &error && die $ftp_a->message; $ftp_a->quit;
After the file transfer had begun, I disconnected the network cable, and watched as the script was terminated at 120 seconds from the time I removed the cable.
I then ran the test again with the Timeout value set to 900. Again, the script terminated at the Timeout value. If the connection was restored at any time within the timout period, the transfer would continue as normal.
I don't have a lot of experience with network programming, but this seems to imply that the timeout is for more than just the connection. However, I still don't know specifically what.
|
|---|