Class: RTunnel::RemoteListenCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/rtunnel/commands.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Command

command_code, decode, printable_codes, registry, #to_encoded_str

Constructor Details

#initialize(address = nil) ⇒ RemoteListenCommand

Returns a new instance of RemoteListenCommand.



152
153
154
155
# File 'lib/rtunnel/commands.rb', line 152

def initialize(address = nil)
  super()
  @address = address
end

Instance Attribute Details

#addressObject (readonly)

Returns the value of attribute address.



150
151
152
# File 'lib/rtunnel/commands.rb', line 150

def address
  @address
end

Instance Method Details

#encode(io) ⇒ Object



167
168
169
170
# File 'lib/rtunnel/commands.rb', line 167

def encode(io)
  super
  io.write_varstring address
end

#initialize_from_io(io) ⇒ Object



161
162
163
164
165
# File 'lib/rtunnel/commands.rb', line 161

def initialize_from_io(io)
  super
  @address = io.read_varstring
  self    
end

#to_sObject



157
158
159
# File 'lib/rtunnel/commands.rb', line 157

def to_s
  super + "/address=#{address}"
end