Class: ReverseTunnel::Message::Ping

Inherits:
ReverseTunnel::Message show all
Defined in:
lib/reverse-tunnel/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ReverseTunnel::Message

create, #pack, #type, type, type_id, #type_id, types, unpack

Constructor Details

#initialize(sequence_number = nil) ⇒ Ping

Returns a new instance of Ping.



125
126
127
# File 'lib/reverse-tunnel/message.rb', line 125

def initialize(sequence_number = nil)
  self.sequence_number = sequence_number
end

Instance Attribute Details

#sequence_numberObject

Returns the value of attribute sequence_number.



123
124
125
# File 'lib/reverse-tunnel/message.rb', line 123

def sequence_number
  @sequence_number
end

Instance Method Details

#load(payload) ⇒ Object



133
134
135
# File 'lib/reverse-tunnel/message.rb', line 133

def load(payload)
  self.sequence_number = payload.first
end

#payloadObject



129
130
131
# File 'lib/reverse-tunnel/message.rb', line 129

def payload
  [sequence_number]
end