Commit 3cb402a0 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Fixes

parent a8287435
......@@ -106,6 +106,7 @@ void QtJsonServer::onTcpServerNewConnection (void) {
connect (tcpSocket, &QTcpSocket::disconnected, this, &QtJsonServer::onTcpSocketDisconnected);
QtJsonSocket * jsonSocket { new QtJsonSocket { tcpSocket, this } };
qWarning () << "WRAPPED JSON SOCKET" << jsonSocket;
emit clientJoined (jsonSocket);
}
}
......@@ -116,6 +117,7 @@ void QtJsonServer::onTcpSocketDisconnected (void) {
if (jsonSocket->getTcpSocket () == tcpSocket) {
qWarning () << "FIND ASSOCIATED JSON SOCKET WRAPPER" << jsonSocket;
disconnect (tcpSocket, &QTcpSocket::disconnected, this, &QtJsonServer::onTcpSocketDisconnected);
emit clientLeaved (jsonSocket);
jsonSocket->deleteLater ();
tcpSocket->deleteLater ();
}
......
......@@ -45,6 +45,7 @@ public:
explicit QtJsonServer (QObject * parent = nullptr);
virtual ~QtJsonServer (void);
public slots:
void start (const quint16 port);
void stop (void);
......@@ -69,6 +70,7 @@ public:
explicit QtJsonClient (QObject * parent = nullptr);
virtual ~QtJsonClient (void);
public slots:
void start (const QString & host, const quint16 port);
void stop (void);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment