class Rex::Proto::Rmi::Model::PingAck

This class provides a representation of an RMI PingAck stream. A PingAck is the acknowledgement for a Ping message.

Attributes

stream_id[RW]

@!attribute stream_id

@return [Fixnum] the input stream id

Private Instance Methods

decode_stream_id(io) click to toggle source

Reads the stream id from the IO

@param io [IO] the IO to read from @return [String] @raise [Rex::Proto::Rmi::DecodeError] if fails to decode stream id

# File lib/rex/proto/rmi/model/ping_ack.rb, line 21
def decode_stream_id(io)
  stream_id = read_byte(io)
  unless stream_id == PING_ACK
    raise Rex::Proto::Rmi::DecodeError, 'Failed to decode PingAck stream id'
  end

  stream_id
end
encode_stream_id() click to toggle source

Encodes the stream_id field

@return [String]

# File lib/rex/proto/rmi/model/ping_ack.rb, line 33
def encode_stream_id
  [stream_id].pack('C')
end