Add new line for json rpc data sending

pull/455/head
Simon Stürz 2021-12-20 15:00:35 +01:00 committed by Michael Zanetti
parent 106961557b
commit fea2ae0866
1 changed files with 3 additions and 1 deletions

View File

@ -76,7 +76,8 @@ void TunnelProxyServer::sendData(const QUuid &clientId, const QByteArray &data)
return; return;
} }
tunnelProxySocket->writeData(data); // Note: we add a \n at the end of the data for easier json parsing on the other end
tunnelProxySocket->writeData(data + '\n');
} }
void TunnelProxyServer::sendData(const QList<QUuid> &clients, const QByteArray &data) void TunnelProxyServer::sendData(const QList<QUuid> &clients, const QByteArray &data)
@ -108,6 +109,7 @@ bool TunnelProxyServer::startServer()
bool TunnelProxyServer::stopServer() bool TunnelProxyServer::stopServer()
{ {
qCDebug(dcTunnelProxyServer()) << "Stopping server";
m_tunnelProxySocketServer->stopServer(); m_tunnelProxySocketServer->stopServer();
return true; return true;
} }