2009
03.05
03.05
While using Net::FTP inside a firewall. Make sure to use the passive option else the get data functions might freeze because the firewall does not allow incoming connections.
Here is how the ftp code will look
ftp = Net::FTP.new('ftp.netlab.co.jp')
ftp.login
ftp.passive = true
files = ftp.chdir('pub/lang/ruby/contrib')
files = ftp.list('n*')
ftp.getbinaryfile('nif.rb-0.91.gz', 'nif.gz', 1024)
ftp.close
No Comment.
Add Your Comment