summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocketserver.cpp
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2013-12-22 17:15:51 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-22 17:16:48 +0100
commitc481daa1899ebffe6d7d3805fd503aa8d29ad715 (patch)
tree13202ffde3aa220d0a9eec7f704494cae3e37d80 /src/websockets/qwebsocketserver.cpp
parent83caeb8ca705e95330f14f8795ffd0bf84cc3a9b (diff)
downloadqtwebsockets-c481daa1899ebffe6d7d3805fd503aa8d29ad715.tar.gz
Add extra documentation
Change-Id: I1a3c0571faeabf2d05bc144628d186e5ff039014 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/websockets/qwebsocketserver.cpp')
-rw-r--r--src/websockets/qwebsocketserver.cpp48
1 files changed, 45 insertions, 3 deletions
diff --git a/src/websockets/qwebsocketserver.cpp b/src/websockets/qwebsocketserver.cpp
index 3198c13..b20e2f6 100644
--- a/src/websockets/qwebsocketserver.cpp
+++ b/src/websockets/qwebsocketserver.cpp
@@ -103,7 +103,7 @@
*/
/*!
- \fn void QWebSocketServer::serverError(QNetworkProtocol::CloseCode closeCode)
+ \fn void QWebSocketServer::serverError(QWebSocketProtocol::CloseCode closeCode)
This signal is emitted when an error occurs during the setup of a web socket connection.
The \a closeCode parameter describes the type of error that occurred
@@ -136,6 +136,47 @@
this signal, as the connection will always succeed.
*/
+/*!
+ \fn void QWebSocketServer::peerVerifyError(const QSslError &error)
+
+ QWebSocketServer can emit this signal several times during the SSL handshake,
+ before encryption has been established, to indicate that an error has
+ occurred while establishing the identity of the peer. The \a error is
+ usually an indication that QWebSocketServer is unable to securely identify the
+ peer.
+
+ This signal provides you with an early indication when something's wrong.
+ By connecting to this signal, you can manually choose to tear down the
+ connection from inside the connected slot before the handshake has
+ completed. If no action is taken, QWebSocketServer will proceed to emitting
+ QWebSocketServer::sslErrors().
+
+ \sa sslErrors()
+*/
+
+/*!
+ \fn void QWebSocketServer::sslErrors(const QList<QSslError> &errors)
+
+ QWebSocketServer emits this signal after the SSL handshake to indicate that one
+ or more errors have occurred while establishing the identity of the
+ peer. The errors are usually an indication that QWebSocketServer is unable to
+ securely identify the peer. Unless any action is taken, the connection
+ will be dropped after this signal has been emitted.
+
+ \a errors contains one or more errors that prevent QSslSocket from
+ verifying the identity of the peer.
+
+ \sa peerVerifyError()
+*/
+
+/*!
+ \enum QWebSocketServer::SecureMode
+ Indicates whether the server operates over wss (SECURE_MODE) or ws (NON_SECURE_MODE)
+
+ \value SECURE_MODE The server operates in secure mode (over wss)
+ \value NON_SECURE_MODE The server operates in non-secure mode (over ws)
+ */
+
#include "qwebsocketprotocol.h"
#include "qwebsocket.h"
#include "qwebsocketserver.h"
@@ -154,7 +195,8 @@ QT_BEGIN_NAMESPACE
/*!
Constructs a new WebSocketServer with the given \a serverName.
The \a serverName will be used in the http handshake phase to identify the server.
-
+ The \a secureMode parameter indicates whether the server operates over wss (\l{SECURE_MODE})
+ or over ws (\l{NON_SECURE_MODE}).
\a parent is passed to the QObject constructor.
*/
@@ -326,7 +368,7 @@ void QWebSocketServer::setSslConfiguration(const QSslConfiguration &sslConfigura
If the server is not running in secure mode (QWebSocketServer::SECURE_MODE),
this method returns QSslConfiguration::defaultConfiguration().
- \sa sslConfiguration(), SecureMode, QSslConfiguration::defaultConfiguration()
+ \sa setSslConfiguration(), SecureMode, QSslConfiguration::defaultConfiguration()
*/
QSslConfiguration QWebSocketServer::sslConfiguration() const
{