lib/net/sftp/protocol/base.rb
# Attept to parse the given packet. If the packet is of an unsupported
# type, an exception will be raised. Returns the parsed data as a hash
# (the keys in the hash are packet-type specific).
Attept to parse the given packet. If the packet is of an unsupported
type, an exception will be raised. Returns the parsed data as a hash
(the keys in the hash are packet-type specific).
Attept to parse the given packet . If the packet is of an unsupported type an exception will be raised . Returns the parsed data as a hash ( the keys in the hash are packet - type specific ) .
def parse(packet)
      case packet.type
      when FXP_STATUS then parse_status_packet(packet)
      when FXP_HANDLE then parse_handle_packet(packet)
      when FXP_DATA   then parse_data_packet(packet)
      when FXP_NAME   then parse_name_packet(packet)
      when FXP_ATTRS  then parse_attrs_packet(packet)
      else raise NotImplementedError, "unknown packet type: #{packet.type}"
      end
    end
def parse ( packet ) case packet . type when FXP_STATUS then parse_status_packet ( packet ) when FXP_HANDLE then parse_handle_packet ( packet ) when FXP_DATA then parse_data_packet ( packet ) when FXP_NAME then parse_name_packet ( packet ) when FXP_ATTRS then parse_attrs_packet ( packet ) else raise NotImplementedError , "unknown packet type: #{packet.type}" end end
Attept to parse the given packet.
Attept to parse the given packet .
packet
<not_specific>