mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-28 12:34:31 +00:00
30 lines
515 B
C
30 lines
515 B
C
|
#ifndef TLSSOCKET_H
|
||
|
|
||
|
#include <QtCore>
|
||
|
#include <QtCrypto>
|
||
|
#include <QTcpSocket>
|
||
|
|
||
|
class TLSSocket : public QTcpSocket
|
||
|
{
|
||
|
public:
|
||
|
TLSSocket(QObject *parent = 0);
|
||
|
~TLSSocket();
|
||
|
|
||
|
void connectToHostEncrypted(const QString &host, quint16 port);
|
||
|
QCA::TLS *tls();
|
||
|
|
||
|
bool waitForReadyRead(int msecs = -1);
|
||
|
|
||
|
protected:
|
||
|
// from qiodevice
|
||
|
virtual qint64 readData(char *data, qint64 maxlen);
|
||
|
virtual qint64 writeData(const char *data, qint64 len);
|
||
|
|
||
|
private:
|
||
|
class Private;
|
||
|
friend class Private;
|
||
|
Private *d;
|
||
|
};
|
||
|
|
||
|
#endif
|