.h
#ifndef CLIENT_H
#define CLIENT_H
#include <QObject>
#include<QTcpSocket>
#include<QThread>
#include<QTimer>
#include"common.h"
class Client : public QObject
{
Q_OBJECT
public:
explicit Client(QObject *parent = nullptr);
~Client()
{
if(socket_ == nullptr)
{
return;
}
if(socket_->state() == QAbstractSocket::ConnectedState)
{
socket_->close();
socket_ = nullptr;
}
}
void Init();
private:
void ParsingBuf(QByteArray buff);
void