Example #1
0
/**
 * 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());
}
Example #2
0
/**
 * 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());
}
Example #3
0
/**
 * 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());
}
Example #4
0
/**
 * Copy-constructor for the MessagePart class.
 *
 * @param message The message that should be copied.
 */
MessagePart::MessagePart(const MessagePart& message)
{
	m_Dictionary = message.GetDictionary();
}