class Net::SSH::Authentication::Agent

def read_packet

is returned as a Net::SSH::Buffer).
tuple consisting of the packet type, and the packet's body (which
Read the next packet from the agent. This will return a two-part
def read_packet
  buffer = Net::SSH::Buffer.new(@socket.read(4))
  buffer.append(@socket.read(buffer.read_long))
  type = buffer.read_byte
  debug { "received agent packet #{type} len #{buffer.length - 4}" }
  return type, buffer
end