Method: Net::SSH::Packet#initialize
- Defined in:
- lib/net/ssh/packet.rb
#initialize(payload) ⇒ Packet
Create a new packet from the given payload. This will automatically parse the packet if it is one that has been previously registered with Packet.register; otherwise, the packet will need to be manually parsed using the methods provided in the Net::SSH::Buffer superclass.
75 76 77 78 79 80 |
# File 'lib/net/ssh/packet.rb', line 75 def initialize(payload) @named_elements = {} super @type = read_byte instantiate! end |