class Net::SFTP::Packet

  1. lib/net/sftp/packet.rb
Parent: SFTP

A specialization of the Net::SSH::Buffer class, which simply auto-reads the type byte from the front of every packet it represents.

Methods

Public Class

  1. new

Public Instance

  1. type

Attributes

type [R]

The (intger) type of this packet. See Net::SFTP::Constants for all possible packet types.

Public Class methods

new (data)

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.

[show source]
# File lib/net/sftp/packet.rb, line 15
def initialize(data)
  super
  @type = read_byte
end