jce-manager/src/connection/qtsslsocket.h

33 lines
579 B
C
Raw Normal View History

2014-06-14 17:02:50 +00:00
#ifndef QTSSLSOCKET_H
#define QTSSLSOCKET_H
#include <QObject>
#include <QSslSocket>
#include <QtNetwork/QSslCipher>
#include <QString>
#include <iostream>
#include <string>
2014-06-18 18:42:46 +00:00
#define milisTimeOut 5000
2014-06-14 17:02:50 +00:00
class qtsslsocket : public QObject
{
Q_OBJECT
public:
qtsslsocket(std::string server,int port);
~qtsslsocket() {
socket->close();
socket = NULL;
}
bool isCon();
bool send(std::string str);
bool recieve(std::string &str);
private:
QSslSocket *socket;
bool flag;
};
#endif // QTSSLSOCKET_H