From: shugo@... Date: 2016-11-23T15:00:33+00:00 Subject: [ruby-core:78277] [Ruby trunk Feature#12966][Assigned] net/ftp to include fxp support? Issue #12966 has been updated by Shugo Maeda. Status changed from Open to Assigned Assignee set to Shugo Maeda sole box wrote: > can we implement support for fxp ? its an extension of the ftp protocol , looks like a legit thing to have no? Do you have a specific interface in mind? I came up with the following interface, but there may be a better interface or name. ```ruby class Net::FTP # PoC code without error check def self.exchange_file(dst_ftp, dst_file, src_ftp, src_file) host, port = dst_ftp.send(:makepasv) src_ftp.send(:sendport, host, port) th = Thread.start { dst_ftp.sendcmd("STOR #{dst_file}") dst_ftp.send(:voidresp) } src_ftp.sendcmd("RETR #{src_file}") src_ftp.send(:voidresp) th.join end end Net::FTP.open(dst_host, username: dst_user, password: dst_pass) do |dst_ftp| Net::FTP.open(src_host, username: src_user, password: src_pass) do |src_ftp| Net::FTP.exchange_file(dst_ftp, dst_file, src_ftp, src_file) end end ``` It's better to support SSCN (Net::FTP#sscn), but I don't know the relationship between SSCN and RFC 4217. Is there any written specification of SSCN? ---------------------------------------- Feature #12966: net/ftp to include fxp support? https://bugs.ruby-lang.org/issues/12966#change-61644 * Author: sole box * Status: Assigned * Priority: Normal * Assignee: Shugo Maeda ---------------------------------------- can we implement support for fxp ? its an extension of the ftp protocol , looks like a legit thing to have no? -- https://bugs.ruby-lang.org/ Unsubscribe: