def send_message(msg, type)
      # Build the message and get it's size
      message = wrap_message(msg, type).serialize_to_string
      message_size = [message.length].pack('N')

      # Write the message to the SSL client and get the response
      @gtv.ssl_client.write(message_size + message)
      data = ""
      @gtv.ssl_client.readpartial(1000,data)
      @gtv.ssl_client.readpartial(1000,data)

      # Extract the response from the Google TV
      outer = OuterMessage.new
      outer.parse_from_string(data)

      return outer
    end
def send_message(msg, type)
      # Build the message and get it's size
      message = wrap_message(msg, type).serialize_to_string
      message_size = [message.length].pack('N')

      # Write the message to the SSL client and get the response
      @gtv.ssl_client.write(message_size + message)
      data = ""
      @gtv.ssl_client.readpartial(1000,data)
      @gtv.ssl_client.readpartial(1000,data)

      # Extract the response from the Google TV
      outer = OuterMessage.new
      outer.parse_from_string(data)

      return outer
    end
Format and send the message to the GoogleTV

 @param [String] msg message to send
 @param [Object] type type of message to send
 @return [Object] the OuterMessage response from the TV