Method: Net::SSH::Buffer#write_mstring

Defined in:
lib/net/ssh/buffer.rb

#write_mstring(*text) ⇒ Object

Writes each argument to the buffer as an SSH2-encoded string. Each string is prefixed by its length, encoded as a 4-byte long integer. Does not alter the read position. Returns the buffer object. Might alter arguments see write_moved



365
366
367
368
369
370
371
372
# File 'lib/net/ssh/buffer.rb', line 365

def write_mstring(*text)
  text.each do |string|
    s = string.to_s
    write_long(s.bytesize)
    write_moved(s)
  end
  self
end