12#include "channel_export.h"
24class CHANNEL_EXPORT
CChannel :
public QIODevice
34 explicit CChannel(QTcpSocket* pSocket, QObject *parent =
nullptr);
42 virtual bool open(OpenMode mode)
override;
43 virtual void close()
override;
47 virtual QString GetDetails();
50 static int InitTranslation();
52 static int RemoveTranslation();
65 void slotError(QAbstractSocket::SocketError e);
68 QTcpSocket* m_pSocket;
71 explicit CChannel(QObject *parent =
nullptr);
75 virtual qint64 readData(
char *data, qint64 maxlen)
override;
76 virtual qint64 writeData(
const char *data, qint64 len)
override;
77 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