/** * Sends a message to the connected peer. * * @param message The message. */ void JsonRpcClient::SendMessage(const MessagePart& message) { Value value = message.GetDictionary(); NetString::WriteStringToIOQueue(this, value.Serialize()); }
/** * Sets a property's value. * * @param key The name of the property. * @param value The value. */ void MessagePart::Set(String key, const MessagePart& value) { GetDictionary()->Set(key, value.GetDictionary()); }
/** * Adds an item to the message using an automatically generated property name. * * @param value The value. */ void MessagePart::Add(const MessagePart& value) { GetDictionary()->Add(value.GetDictionary()); }
/** * Copy-constructor for the MessagePart class. * * @param message The message that should be copied. */ MessagePart::MessagePart(const MessagePart& message) { m_Dictionary = message.GetDictionary(); }