summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocket_p.h
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-11-04 21:16:58 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-04 21:18:01 +0100
commite3b93f838ccade335753559d823f0b087fc81170 (patch)
tree056caa101efec80742f7705a03ecbf83cfc9bb4e /src/websockets/qwebsocket_p.h
parent017405f210bd46d15cdfce2dace674cab6260402 (diff)
downloadqtwebsockets-e3b93f838ccade335753559d823f0b087fc81170.tar.gz
Add QWebSocketConfiguration to pre-cache socket settings
Change-Id: Ibff22b277b89379dc31b0b7a8a02547e12bff58e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/websockets/qwebsocket_p.h')
-rw-r--r--src/websockets/qwebsocket_p.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/websockets/qwebsocket_p.h b/src/websockets/qwebsocket_p.h
index f059c99..80c5e4f 100644
--- a/src/websockets/qwebsocket_p.h
+++ b/src/websockets/qwebsocket_p.h
@@ -52,16 +52,18 @@
// We mean it.
//
-#include <QUrl>
-#include <QHostAddress>
+#include <QtCore/QUrl>
+#include <QtNetwork/QTcpSocket>
+#include <QtNetwork/QHostAddress>
#ifndef QT_NO_NETWORKPROXY
-#include <QNetworkProxy>
+#include <QtNetwork/QNetworkProxy>
#endif
#ifndef QT_NO_SSL
-#include <QSslConfiguration>
-#include <QSslError>
+#include <QtNetwork/QSslConfiguration>
+#include <QtNetwork/QSslError>
+#include <QtNetwork/QSslSocket>
#endif
-#include <QTime>
+#include <QtCore/QTime>
#include "qwebsocketprotocol.h"
#include "qwebsocketdataprocessor_p.h"
@@ -73,6 +75,23 @@ class QWebSocketHandshakeResponse;
class QTcpSocket;
class QWebSocket;
+struct QWebSocketConfiguration
+{
+public:
+ QWebSocketConfiguration();
+
+public:
+#ifndef QT_NO_SSL
+ QSslConfiguration m_sslConfiguration;
+ QList<QSslError> m_ignoredSslErrors;
+ bool m_ignoreSslErrors;
+#endif
+#ifndef QT_NONETWORKPROXY
+ QNetworkProxy m_proxy;
+#endif
+ QTcpSocket *m_pSocket;
+};
+
class QWebSocketPrivate : public QObject
{
Q_OBJECT
@@ -149,11 +168,6 @@ private Q_SLOTS:
private:
QWebSocket * const q_ptr;
-#ifndef QT_NO_SSL
- QSslConfiguration m_sslConfiguration;
- QList<QSslError> m_ignoredSslErrors;
- bool m_ignoreSslErrors;
-#endif
QWebSocketPrivate(QTcpSocket *pTcpSocket, QWebSocketProtocol::Version version, QWebSocket *pWebSocket, QObject *parent = Q_NULLPTR);
void setVersion(QWebSocketProtocol::Version version);
@@ -213,6 +227,7 @@ private:
QTime m_pingTimer;
QWebSocketDataProcessor m_dataProcessor;
+ QWebSocketConfiguration m_configuration;
friend class QWebSocketServerPrivate;
};