class Net::SSH::Packet

A specialization of Buffer that knows the format of certain common packet types. It auto-parses those packet types, and allows them to be accessed via the [] accessor.

data = some_channel_request_packet
packet = Net::SSH::Packet.new(data)

p packet.type #-> 98 (CHANNEL_REQUEST)
p packet[:request]
p packet[:want_reply]

This is used exclusively internally by Net::SSH, and unless you’re doing protocol-level manipulation or are extending Net::SSH in some way, you’ll never need to use this class directly.