do_version (Net::SFTP::Protocol::Driver)

    # File lib/net/sftp/protocol/driver.rb, line 133
        def do_version( content )
          assert_state :version
          @log.debug "negotiating sftp protocol version" if @log.debug?
          @log.debug "my sftp version is #{@version}" if @log.debug?

          server_version = content.read_long
          @log.debug "server reports sftp version #{server_version}" if @log.debug?

          negotiated_version = [ @version, server_version ].min
          @log.info "negotiated version is #{negotiated_version}" if @log.info?

          extensions = Hash.new
          until content.eof?
            ext_name = content.read_string
            ext_data = content.read_string
            extensions[ ext_name ] = ext_data
          end

          @dispatcher = @dispatchers[ negotiated_version, extensions ]

          @state = :open

          @on_open.call( self ) if @on_open
        end