12#include "plugin_export.h"
14#define DEFAULT_TIMEOUT 500000
36 explicit CChannel(QTcpSocket* pSocket, QObject *parent =
nullptr);
44 virtual bool open(OpenMode mode)
override;
45 virtual void close()
override;
49 virtual QString GetDetails();
52 static int InitTranslation();
54 static int RemoveTranslation();
56 static QString GetSize(qint64 size);
69 void slotError(QAbstractSocket::SocketError e);
72 QTcpSocket* m_pSocket;
75 explicit CChannel(QObject *parent =
nullptr);
79 virtual qint64 readData(
char *data, qint64 maxlen)
override;
80 virtual qint64 writeData(
const char *data, qint64 len)
override;
81 virtual bool isSequential()
const override;
The channel interface class.
void sigConnected()
emit when the channel is connected.
void sigDisconnected()
emit when the channel is disconnected
void sigError(int nErr, const QString &szErr)
emit when the channel is error