method
parse229
parse229(resp)
private
Hide source
# File lib/net/ftp.rb, line 869 def parse229(resp) if resp[0, 3] != "229" raise FTPReplyError, resp end left = resp.index("(") right = resp.index(")") if left == nil or right == nil raise FTPProtoError, resp end numbers = resp[left + 1 .. right - 1].split(resp[left + 1, 1]) if numbers.length != 4 raise FTPProtoError, resp end port = numbers[3].to_i host = (@sock.peeraddr())[3] return host, port end