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;
45 virtual QString GetDetails();
47 static int InitTranslation();
48 static int RemoveTranslation();
61 void slotError(QAbstractSocket::SocketError e);
64 QTcpSocket* m_pSocket;
67 explicit CChannel(QObject *parent =
nullptr);
71 virtual qint64 readData(
char *data, qint64 maxlen)
override;
72 virtual qint64 writeData(
const char *data, qint64 len)
override;
73 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