Class: ReverseTunnel::Message::OpenSession

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(session_id = nil) ⇒ OpenSession

Returns a new instance of OpenSession.



92
93
94
# File 'lib/reverse-tunnel/message.rb', line 92

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

Instance Attribute Details

#session_idObject

Returns the value of attribute session_id.



90
91
92
# File 'lib/reverse-tunnel/message.rb', line 90

def session_id
  @session_id
end

Instance Method Details

#load(payload) ⇒ Object



100
101
102
# File 'lib/reverse-tunnel/message.rb', line 100

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

#payloadObject



96
97
98
# File 'lib/reverse-tunnel/message.rb', line 96

def payload
  [session_id]
end