12#include "plugin_export.h"
15#define DEFAULT_TIMEOUT 500000
37 explicit CChannel(QTcpSocket* pSocket, QObject *parent =
nullptr);
45 virtual bool open(OpenMode mode)
override;
46 virtual void close()
override;
50 virtual QString GetDetails();
53 static int InitTranslation();
55 static int RemoveTranslation();
84 void slotError(QAbstractSocket::SocketError e);
87 QTcpSocket* m_pSocket;
90 explicit CChannel(QObject *parent =
nullptr);
94 virtual qint64 readData(
char *data, qint64 maxlen)
override;
95 virtual qint64 writeData(
const char *data, qint64 len)
override;
96 virtual bool isSequential()
const override;
void sigSend(quint64 counts)
Send data counts
void sigConnected()
emit when the channel is connected.
void sigReceive(quint64 counts)
Receive data counts
void sigDisconnected()
emit when the channel is disconnected
void sigError(int nErr, const QString &szErr)
emit when the channel is error
void sigSecurityLevel(CSecurityLevel::Levels level)
当安全级别改变时触发