diff --git a/proxyobject.cpp b/proxyobject.cpp index a3c96fed5c10f15d7221e1ebd93e66ceafaedd95..ad83901b71651fede2653bc537c308b6d8c80313 100644 --- a/proxyobject.cpp +++ b/proxyobject.cpp @@ -21,7 +21,8 @@ ProxyObject::ProxyObject(QObject *parent) connect (engine, &zp_net_Engine::evt_NewClientConnected, this, &ProxyObject::slot_NewClientConnected,Qt::QueuedConnection ); connect (engine, &zp_net_Engine::evt_ClientDisconnected, this, &ProxyObject::slot_ClientDisconnected ,Qt::QueuedConnection); connect (engine, &zp_net_Engine::evt_Data_recieved, this, &ProxyObject::slot_Data_recieved ,Qt::QueuedConnection); - initEngine(); + connect (engine, &zp_net_Engine::evt_Data_transferred, this, &ProxyObject::slot_Data_transferred ,Qt::QueuedConnection); + initEngine(); m_nTimerRefresh = startTimer(1000); } void ProxyObject::slot_Message(QObject * pSource,QString message ) @@ -208,7 +209,10 @@ void ProxyObject::slot_Data_recieved(QObject * clientHandle,QByteArray datablo engine->SendDataToClient(m_hash_Outer2Inner[clientHandle],datablock); else if (pending_kick.contains(clientHandle)==false) pending_data[clientHandle].push_back(datablock); - //Keep timestamp fresh +} +void ProxyObject::slot_Data_transferred(QObject * clientHandle,qint64 /*bytes sent*/, quint64 extraData) +{ + //Keep timestamp fresh if (pending_kick.contains(clientHandle)) pending_kick[clientHandle] = QDateTime::currentDateTime(); } diff --git a/proxyobject.h b/proxyobject.h index 1c9ad396a05e8924e5064a0ce39f80aafcf10b6e..06a55ebf77c1ae06971cc15ccd0ea50f1070dd68 100644 --- a/proxyobject.h +++ b/proxyobject.h @@ -39,6 +39,8 @@ public slots: void slot_ClientDisconnected(QObject * /*clientHandle*/,quint64); //some data arrival void slot_Data_recieved(QObject * /*clientHandle*/,QByteArray /*datablock*/ ,quint64); + //a block of data has been successfuly sent + void slot_Data_transferred(QObject * /*clientHandle*/,qint64 /*bytes sent*/, quint64 extraData); }; #endif // PROXYOBJECT_H