bring back the welcome message

Fixes #4
This commit is contained in:
Michael Zanetti 2014-04-28 20:44:49 +02:00
parent df001695a1
commit c1ed5054c8

View File

@ -245,6 +245,13 @@ void JsonRPCServer::clientConnected(const QUuid &clientId)
{
// Notifications disabled by default
m_clients.insert(clientId, false);
QVariantMap handshake;
handshake.insert("id", 0);
handshake.insert("server", "guh JSONRPC interface");
handshake.insert("version", "0.0.0");
QJsonDocument jsonDoc = QJsonDocument::fromVariant(handshake);
m_tcpServer->sendData(clientId, jsonDoc.toJson());
}
void JsonRPCServer::clientDisconnected(const QUuid &clientId)