method
parse227
parse227(resp)
private
Hide source
# File lib/net/ftp.rb, line 824 def parse227(resp) if resp[0, 3] != "227" 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(",") if numbers.length != 6 raise FTPProtoError, resp end host = numbers[0, 4].join(".") port = (numbers[4].to_i << 8) + numbers[5].to_i return host, port end