aboutsummaryrefslogtreecommitdiff
path: root/src/TcpTasks/ListenClientHandler/listenclientdisconnect.cpp
blob: 55e5f9ff9b018007e784919fab94d4af172e225c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "listenclienthandler.h"

void ListenClientHandler::disconnect()
{
    _timeOut.stop();
    _tcpSocket->disconnectFromHost();
}

void ListenClientHandler::onListenClientDisconnect()
{
    _timeOut.stop();
    _coreObject->Log.logEvent("tcp", QStringLiteral("%1 disconnected").arg(_clientLabel) );
    this->deleteLater();
}

void ListenClientHandler::onListenClientTimeOut()
{
    _timeOut.stop();
    _coreObject->Log.logEvent("tcp", QStringLiteral("%1 timed out").arg(_clientLabel) );
    this->disconnect();
}