qghtcpclient.h 1021 字节
Newer Older
丁劲犇's avatar
丁劲犇 已提交
1 2 3
#ifndef QGHTCPCLIENT_H
#define QGHTCPCLIENT_H
#include <QList>
4 5 6 7
#include <QTcpSocket>
#include "../ZoomPipeline_FuncSvr/network/ssl_config.h"

class QGHTcpClient : public QTcpSocket
8 9 10 11
{
	Q_OBJECT

public:
12 13
	QGHTcpClient(QObject *parent,int nPayLoad = 4096);
	~QGHTcpClient();
14
	quint32 uuid();
15
	void geneGlobalUUID(QString  globalUuidFile);
16 17
private:

18
	quint32 m_uuid;	int m_nPayLoad;
19 20 21 22 23 24 25 26
	QList<QByteArray> m_buffer_sending;
	QList<qint64> m_buffer_sending_offset;
public slots:
	void some_data_sended(qint64);
	void SendData(QByteArray dtarray);

};

27 28 29
#if (ZP_WANTSSL!=0)
#include <QSslSocket>
class QGHSslClient : public QSslSocket
丁劲犇's avatar
丁劲犇 已提交
30
{
丁劲犇's avatar
丁劲犇 已提交
31
	Q_OBJECT
丁劲犇's avatar
丁劲犇 已提交
32 33

public:
34 35
	QGHSslClient(QObject *parent,int nPayLoad = 4096);
	~QGHSslClient();
36
	quint32 uuid();
37
	void geneGlobalUUID(QString  globalUuidFile);
丁劲犇's avatar
丁劲犇 已提交
38
private:
39

40 41
	quint32 m_uuid;
	int m_nPayLoad;
丁劲犇's avatar
丁劲犇 已提交
42 43
	QList<QByteArray> m_buffer_sending;
	QList<qint64> m_buffer_sending_offset;
丁劲犇's avatar
丁劲犇 已提交
44
public slots:
丁劲犇's avatar
丁劲犇 已提交
45 46
	void some_data_sended(qint64);
	void SendData(QByteArray dtarray);
丁劲犇's avatar
丁劲犇 已提交
47 48

};
49
#endif
丁劲犇's avatar
丁劲犇 已提交
50
#endif // QGHTCPCLIENT_H