Flowdock
parse229(resp) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/net/ftp.rb, line 927
    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
Register or log in to add new notes.