HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/rubygems-integration/all/gems/net-sftp-3.0.0/lib/net/sftp/packet.rb
require 'net/ssh/buffer'

module Net; module SFTP

  # A specialization of the Net::SSH::Buffer class, which simply auto-reads
  # the type byte from the front of every packet it represents.
  class Packet < Net::SSH::Buffer
    # The (intger) type of this packet. See Net::SFTP::Constants for all
    # possible packet types.
    attr_reader :type

    # Create a new Packet object that wraps the given +data+ (which should be
    # a String). The first byte of the data will be consumed automatically and
    # interpreted as the #type of this packet.
    def initialize(data)
      super
      @type = read_byte
    end
  end

end; end