src/ruby_supportlib/phusion_passenger/message_channel.rb
def write(name, *args)
      check_argument(name)
      args.each do |arg|
        check_argument(arg)
      end

      message = "#{name}#{DELIMITER}"
      args.each do |arg|
        message << arg.to_s << DELIMITER
      end

      if message.size > 2 ** 16 - 1
        raise ArgumentError, 'Message size too large'
      end

      @io.write([message.size].pack('n') << message)
      @io.flush
    end
# Send an array message, which consists of the given elements, over the underlying
# file descriptor. _name_ is the first element in the message, and _args_ are the
# other elements. These arguments will internally be converted to strings by calling
# to_s().
#
# Might raise SystemCallError, IOError or SocketError when something
# goes wrong.
Send an array message, which consists of the given elements, over the underlying
file descriptor. _name_ is the first element in the message, and _args_ are the
other elements. These arguments will internally be converted to strings by calling
to_s().

Might raise SystemCallError, IOError or SocketError when something
goes wrong.
Send an array message which consists of the given elements over the underlying file descriptor . _name_ is the first element in the message and _args_ are the other elements . These arguments will internally be converted to strings by calling to_s () . Might raise SystemCallError IOError or SocketError when something goes wrong .
def write(name, *args)
      check_argument(name)
      args.each do |arg|
        check_argument(arg)
      end
      message = "#{name}#{DELIMITER}"
      args.each do |arg|
        message << arg.to_s << DELIMITER
      end
      if message.size > 2 ** 16 - 1
        raise ArgumentError, 'Message size too large'
      end
      @io.write([message.size].pack('n') << message)
      @io.flush
    end
def write ( name , * args ) check_argument ( name ) args . each do | arg | check_argument ( arg ) end message = "#{name}#{DELIMITER}" args . each do | arg | message << arg . to_s << DELIMITER end if message . size > 2 ** 16 - 1 raise ArgumentError , 'Message size too large' end @io . write ( [ message . size ] . pack ( 'n' ) << message ) @io . flush end
Send an array message, which consists of the given elements, over the underlying
file descriptor.
Send an array message which consists of the given elements over the underlying file descriptor .
name
args