summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocketserver_p.h
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-11-06 20:00:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 20:02:37 +0100
commit91f93d2781e494d7835385aa501667d71ae231e7 (patch)
tree5eb0055dd628942073c7291249e93542f84f899c /src/websockets/qwebsocketserver_p.h
parent529b9a7cc85f63966c8ed6150ea18286b7459b1e (diff)
downloadqtwebsockets-91f93d2781e494d7835385aa501667d71ae231e7.tar.gz
Add sslEchoClient and sslEchoServer examples
Add license headers Change-Id: Ied74cb3db6ceed6c3f361e4afac860a7a3fb7676 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/websockets/qwebsocketserver_p.h')
-rw-r--r--src/websockets/qwebsocketserver_p.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/websockets/qwebsocketserver_p.h b/src/websockets/qwebsocketserver_p.h
index 94491f7..5e089d7 100644
--- a/src/websockets/qwebsocketserver_p.h
+++ b/src/websockets/qwebsocketserver_p.h
@@ -58,6 +58,11 @@
#include <QtNetwork/QHostAddress>
#include "qwebsocket.h"
+#ifndef QT_NO_SSL
+#include <QtNetwork/QSslConfiguration>
+#include <QtNetwork/QSslError>
+#endif
+
QT_BEGIN_NAMESPACE
class QTcpServer;
@@ -70,7 +75,13 @@ class QWebSocketServerPrivate : public QObject
Q_DECLARE_PUBLIC(QWebSocketServer)
public:
- explicit QWebSocketServerPrivate(const QString &serverName, QWebSocketServer * const pWebSocketServer, QObject *parent = Q_NULLPTR);
+ enum SecureMode
+ {
+ SECURE_MODE = true,
+ NON_SECURE_MODE
+ };
+
+ explicit QWebSocketServerPrivate(const QString &serverName, SecureMode secureMode, QWebSocketServer * const pWebSocketServer, QObject *parent = Q_NULLPTR);
virtual ~QWebSocketServerPrivate();
void close();
@@ -101,8 +112,12 @@ public:
void setServerName(const QString &serverName);
QString serverName() const;
-Q_SIGNALS:
- void newConnection();
+ SecureMode secureMode() const;
+
+#ifndef QT_NO_SSL
+ void setSslConfiguration(const QSslConfiguration &sslConfiguration);
+ QSslConfiguration sslConfiguration() const;
+#endif
private Q_SLOTS:
void onNewConnection();
@@ -114,6 +129,7 @@ private:
QTcpServer *m_pTcpServer;
QString m_serverName;
+ SecureMode m_secureMode;
QQueue<QWebSocket *> m_pendingConnections;
void addPendingConnection(QWebSocket *pWebSocket);