def wrap_message(msg, type)
      # Wrap it in an envelope
      outer = OuterMessage.new
      outer.protocol_version = 1
      outer.status  = OuterMessage::Status::STATUS_OK
      outer.type    = type
      outer.payload = msg.serialize_to_string

      return outer
    end
def wrap_message(msg, type)
      # Wrap it in an envelope
      outer = OuterMessage.new
      outer.protocol_version = 1
      outer.status  = OuterMessage::Status::STATUS_OK
      outer.type    = type
      outer.payload = msg.serialize_to_string

      return outer
    end
Wrap the message in an OuterMessage

 @param [String] msg message to send
 @param [Object] type type of message to send
 @return [Object] a properly formatted OuterMessage