summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/examples.pro11
-rw-r--r--examples/websockets/doc/echoclient.qdoc (renamed from examples/doc/echoclient.qdoc)0
-rw-r--r--examples/websockets/doc/echoserver.qdoc (renamed from examples/doc/echoserver.qdoc)0
-rw-r--r--examples/websockets/doc/examples.qdoc (renamed from examples/examples.qdoc)13
-rw-r--r--examples/websockets/doc/qmlwebsocketclient.qdoc (renamed from examples/doc/qmlwebsocketclient.qdoc)0
-rw-r--r--examples/websockets/doc/simplechat.qdoc (renamed from examples/doc/simplechat.qdoc)0
-rw-r--r--examples/websockets/doc/sslechoclient.qdoc (renamed from examples/doc/sslechoclient.qdoc)0
-rw-r--r--examples/websockets/doc/sslechoserver.qdoc (renamed from examples/doc/sslechoserver.qdoc)0
-rw-r--r--examples/websockets/echoclient/echoclient.cpp (renamed from examples/echoclient/echoclient.cpp)0
-rw-r--r--examples/websockets/echoclient/echoclient.h (renamed from examples/echoclient/echoclient.h)0
-rw-r--r--examples/websockets/echoclient/echoclient.pro (renamed from examples/echoclient/echoclient.pro)0
-rw-r--r--examples/websockets/echoclient/main.cpp (renamed from examples/echoclient/main.cpp)0
-rw-r--r--examples/websockets/echoserver/echoclient.html (renamed from examples/echoserver/echoclient.html)0
-rw-r--r--examples/websockets/echoserver/echoserver.cpp (renamed from examples/echoserver/echoserver.cpp)0
-rw-r--r--examples/websockets/echoserver/echoserver.h (renamed from examples/echoserver/echoserver.h)0
-rw-r--r--examples/websockets/echoserver/echoserver.pro (renamed from examples/echoserver/echoserver.pro)0
-rw-r--r--examples/websockets/echoserver/main.cpp (renamed from examples/echoserver/main.cpp)0
-rw-r--r--examples/websockets/qmlwebsocketclient/data.qrc (renamed from examples/qmlwebsocketclient/data.qrc)0
-rw-r--r--examples/websockets/qmlwebsocketclient/main.cpp (renamed from examples/qmlwebsocketclient/main.cpp)0
-rw-r--r--examples/websockets/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml (renamed from examples/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml)0
-rw-r--r--examples/websockets/qmlwebsocketclient/qmlwebsocketclient.pro (renamed from examples/qmlwebsocketclient/qmlwebsocketclient.pro)0
-rw-r--r--examples/websockets/simplechat/chatclient.html (renamed from examples/simplechat/chatclient.html)0
-rw-r--r--examples/websockets/simplechat/chatserver.cpp (renamed from examples/simplechat/chatserver.cpp)0
-rw-r--r--examples/websockets/simplechat/chatserver.h (renamed from examples/simplechat/chatserver.h)0
-rw-r--r--examples/websockets/simplechat/main.cpp (renamed from examples/simplechat/main.cpp)0
-rw-r--r--examples/websockets/simplechat/simplechat.pro (renamed from examples/simplechat/simplechat.pro)0
-rw-r--r--examples/websockets/sslechoclient/main.cpp (renamed from examples/sslechoclient/main.cpp)0
-rw-r--r--examples/websockets/sslechoclient/sslechoclient.cpp (renamed from examples/sslechoclient/sslechoclient.cpp)0
-rw-r--r--examples/websockets/sslechoclient/sslechoclient.h (renamed from examples/sslechoclient/sslechoclient.h)0
-rw-r--r--examples/websockets/sslechoclient/sslechoclient.pro (renamed from examples/sslechoclient/sslechoclient.pro)0
-rw-r--r--examples/websockets/sslechoserver/localhost.cert (renamed from examples/sslechoserver/localhost.cert)0
-rw-r--r--examples/websockets/sslechoserver/localhost.key (renamed from examples/sslechoserver/localhost.key)0
-rw-r--r--examples/websockets/sslechoserver/main.cpp (renamed from examples/sslechoserver/main.cpp)0
-rw-r--r--examples/websockets/sslechoserver/sslechoclient.html (renamed from examples/sslechoserver/sslechoclient.html)0
-rw-r--r--examples/websockets/sslechoserver/sslechoserver.cpp (renamed from examples/sslechoserver/sslechoserver.cpp)0
-rw-r--r--examples/websockets/sslechoserver/sslechoserver.h (renamed from examples/sslechoserver/sslechoserver.h)0
-rw-r--r--examples/websockets/sslechoserver/sslechoserver.pro (renamed from examples/sslechoserver/sslechoserver.pro)0
-rw-r--r--examples/websockets/websockets.pro12
-rw-r--r--src/websockets/doc/qtwebsockets.qdocconf4
-rw-r--r--src/websockets/doc/src/index.qdoc3
-rw-r--r--src/websockets/qmaskgenerator.cpp6
-rw-r--r--src/websockets/qwebsocket.cpp14
-rw-r--r--src/websockets/qwebsocket.h1
-rw-r--r--src/websockets/qwebsocket_p.cpp7
-rw-r--r--src/websockets/qwebsocket_p.h2
-rw-r--r--src/websockets/qwebsocketcorsauthenticator.cpp8
-rw-r--r--src/websockets/qwebsocketserver.cpp20
47 files changed, 49 insertions, 52 deletions
diff --git a/examples/examples.pro b/examples/examples.pro
index 76a0e9f..158e1ce 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -1,12 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS = echoclient \
- echoserver \
- simplechat
-qtHaveModule(quick): SUBDIRS += qmlwebsocketclient
-
-contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
-SUBDIRS += \
- sslechoserver \
- sslechoclient
-}
+SUBDIRS = websockets \ No newline at end of file
diff --git a/examples/doc/echoclient.qdoc b/examples/websockets/doc/echoclient.qdoc
index a6cb1a9..a6cb1a9 100644
--- a/examples/doc/echoclient.qdoc
+++ b/examples/websockets/doc/echoclient.qdoc
diff --git a/examples/doc/echoserver.qdoc b/examples/websockets/doc/echoserver.qdoc
index fcb0442..fcb0442 100644
--- a/examples/doc/echoserver.qdoc
+++ b/examples/websockets/doc/echoserver.qdoc
diff --git a/examples/examples.qdoc b/examples/websockets/doc/examples.qdoc
index bc1ad32..a9cc739 100644
--- a/examples/examples.qdoc
+++ b/examples/websockets/doc/examples.qdoc
@@ -41,18 +41,9 @@
/*!
+ \group qtwebsockets-examples
\title Qt WebSockets Examples
- \page examples.html
\brief List of Qt WebSocket examples
- The examples below can be used as a guide to using the API.
-
- \list
- \li \l echoclient
- \li \l echoserver
- \li \l qmlwebsocketclient
- \li \l simplechat
- \li \l sslechoclient
- \li \l sslechoserver
- \endlist
+ The examples below can be used as a guide to using the \l{Qt WebSockets} API.
*/
diff --git a/examples/doc/qmlwebsocketclient.qdoc b/examples/websockets/doc/qmlwebsocketclient.qdoc
index 776e486..776e486 100644
--- a/examples/doc/qmlwebsocketclient.qdoc
+++ b/examples/websockets/doc/qmlwebsocketclient.qdoc
diff --git a/examples/doc/simplechat.qdoc b/examples/websockets/doc/simplechat.qdoc
index 506d45a..506d45a 100644
--- a/examples/doc/simplechat.qdoc
+++ b/examples/websockets/doc/simplechat.qdoc
diff --git a/examples/doc/sslechoclient.qdoc b/examples/websockets/doc/sslechoclient.qdoc
index d7d1897..d7d1897 100644
--- a/examples/doc/sslechoclient.qdoc
+++ b/examples/websockets/doc/sslechoclient.qdoc
diff --git a/examples/doc/sslechoserver.qdoc b/examples/websockets/doc/sslechoserver.qdoc
index d158a68..d158a68 100644
--- a/examples/doc/sslechoserver.qdoc
+++ b/examples/websockets/doc/sslechoserver.qdoc
diff --git a/examples/echoclient/echoclient.cpp b/examples/websockets/echoclient/echoclient.cpp
index 9e8ba9b..9e8ba9b 100644
--- a/examples/echoclient/echoclient.cpp
+++ b/examples/websockets/echoclient/echoclient.cpp
diff --git a/examples/echoclient/echoclient.h b/examples/websockets/echoclient/echoclient.h
index b5a7709..b5a7709 100644
--- a/examples/echoclient/echoclient.h
+++ b/examples/websockets/echoclient/echoclient.h
diff --git a/examples/echoclient/echoclient.pro b/examples/websockets/echoclient/echoclient.pro
index 24848e7..24848e7 100644
--- a/examples/echoclient/echoclient.pro
+++ b/examples/websockets/echoclient/echoclient.pro
diff --git a/examples/echoclient/main.cpp b/examples/websockets/echoclient/main.cpp
index fccaed1..fccaed1 100644
--- a/examples/echoclient/main.cpp
+++ b/examples/websockets/echoclient/main.cpp
diff --git a/examples/echoserver/echoclient.html b/examples/websockets/echoserver/echoclient.html
index e9c55dc..e9c55dc 100644
--- a/examples/echoserver/echoclient.html
+++ b/examples/websockets/echoserver/echoclient.html
diff --git a/examples/echoserver/echoserver.cpp b/examples/websockets/echoserver/echoserver.cpp
index b35df53..b35df53 100644
--- a/examples/echoserver/echoserver.cpp
+++ b/examples/websockets/echoserver/echoserver.cpp
diff --git a/examples/echoserver/echoserver.h b/examples/websockets/echoserver/echoserver.h
index 521eccb..521eccb 100644
--- a/examples/echoserver/echoserver.h
+++ b/examples/websockets/echoserver/echoserver.h
diff --git a/examples/echoserver/echoserver.pro b/examples/websockets/echoserver/echoserver.pro
index 6d2360b..6d2360b 100644
--- a/examples/echoserver/echoserver.pro
+++ b/examples/websockets/echoserver/echoserver.pro
diff --git a/examples/echoserver/main.cpp b/examples/websockets/echoserver/main.cpp
index ff3993e..ff3993e 100644
--- a/examples/echoserver/main.cpp
+++ b/examples/websockets/echoserver/main.cpp
diff --git a/examples/qmlwebsocketclient/data.qrc b/examples/websockets/qmlwebsocketclient/data.qrc
index 3ac4604..3ac4604 100644
--- a/examples/qmlwebsocketclient/data.qrc
+++ b/examples/websockets/qmlwebsocketclient/data.qrc
diff --git a/examples/qmlwebsocketclient/main.cpp b/examples/websockets/qmlwebsocketclient/main.cpp
index 3aa1c95..3aa1c95 100644
--- a/examples/qmlwebsocketclient/main.cpp
+++ b/examples/websockets/qmlwebsocketclient/main.cpp
diff --git a/examples/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml b/examples/websockets/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml
index 5560c4c..5560c4c 100644
--- a/examples/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml
+++ b/examples/websockets/qmlwebsocketclient/qml/qmlwebsocketclient/main.qml
diff --git a/examples/qmlwebsocketclient/qmlwebsocketclient.pro b/examples/websockets/qmlwebsocketclient/qmlwebsocketclient.pro
index e7dc82a..e7dc82a 100644
--- a/examples/qmlwebsocketclient/qmlwebsocketclient.pro
+++ b/examples/websockets/qmlwebsocketclient/qmlwebsocketclient.pro
diff --git a/examples/simplechat/chatclient.html b/examples/websockets/simplechat/chatclient.html
index 5b077f7..5b077f7 100644
--- a/examples/simplechat/chatclient.html
+++ b/examples/websockets/simplechat/chatclient.html
diff --git a/examples/simplechat/chatserver.cpp b/examples/websockets/simplechat/chatserver.cpp
index ba5c97c..ba5c97c 100644
--- a/examples/simplechat/chatserver.cpp
+++ b/examples/websockets/simplechat/chatserver.cpp
diff --git a/examples/simplechat/chatserver.h b/examples/websockets/simplechat/chatserver.h
index 41dad41..41dad41 100644
--- a/examples/simplechat/chatserver.h
+++ b/examples/websockets/simplechat/chatserver.h
diff --git a/examples/simplechat/main.cpp b/examples/websockets/simplechat/main.cpp
index a44f16e..a44f16e 100644
--- a/examples/simplechat/main.cpp
+++ b/examples/websockets/simplechat/main.cpp
diff --git a/examples/simplechat/simplechat.pro b/examples/websockets/simplechat/simplechat.pro
index 5cb6d4f..5cb6d4f 100644
--- a/examples/simplechat/simplechat.pro
+++ b/examples/websockets/simplechat/simplechat.pro
diff --git a/examples/sslechoclient/main.cpp b/examples/websockets/sslechoclient/main.cpp
index 228b37d..228b37d 100644
--- a/examples/sslechoclient/main.cpp
+++ b/examples/websockets/sslechoclient/main.cpp
diff --git a/examples/sslechoclient/sslechoclient.cpp b/examples/websockets/sslechoclient/sslechoclient.cpp
index 037990d..037990d 100644
--- a/examples/sslechoclient/sslechoclient.cpp
+++ b/examples/websockets/sslechoclient/sslechoclient.cpp
diff --git a/examples/sslechoclient/sslechoclient.h b/examples/websockets/sslechoclient/sslechoclient.h
index 7ec373b..7ec373b 100644
--- a/examples/sslechoclient/sslechoclient.h
+++ b/examples/websockets/sslechoclient/sslechoclient.h
diff --git a/examples/sslechoclient/sslechoclient.pro b/examples/websockets/sslechoclient/sslechoclient.pro
index 431301f..431301f 100644
--- a/examples/sslechoclient/sslechoclient.pro
+++ b/examples/websockets/sslechoclient/sslechoclient.pro
diff --git a/examples/sslechoserver/localhost.cert b/examples/websockets/sslechoserver/localhost.cert
index 7aa33a1..7aa33a1 100644
--- a/examples/sslechoserver/localhost.cert
+++ b/examples/websockets/sslechoserver/localhost.cert
diff --git a/examples/sslechoserver/localhost.key b/examples/websockets/sslechoserver/localhost.key
index dcc262c..dcc262c 100644
--- a/examples/sslechoserver/localhost.key
+++ b/examples/websockets/sslechoserver/localhost.key
diff --git a/examples/sslechoserver/main.cpp b/examples/websockets/sslechoserver/main.cpp
index 5b4ff4e..5b4ff4e 100644
--- a/examples/sslechoserver/main.cpp
+++ b/examples/websockets/sslechoserver/main.cpp
diff --git a/examples/sslechoserver/sslechoclient.html b/examples/websockets/sslechoserver/sslechoclient.html
index b9faa44..b9faa44 100644
--- a/examples/sslechoserver/sslechoclient.html
+++ b/examples/websockets/sslechoserver/sslechoclient.html
diff --git a/examples/sslechoserver/sslechoserver.cpp b/examples/websockets/sslechoserver/sslechoserver.cpp
index d93e5c6..d93e5c6 100644
--- a/examples/sslechoserver/sslechoserver.cpp
+++ b/examples/websockets/sslechoserver/sslechoserver.cpp
diff --git a/examples/sslechoserver/sslechoserver.h b/examples/websockets/sslechoserver/sslechoserver.h
index f4e9a9b..f4e9a9b 100644
--- a/examples/sslechoserver/sslechoserver.h
+++ b/examples/websockets/sslechoserver/sslechoserver.h
diff --git a/examples/sslechoserver/sslechoserver.pro b/examples/websockets/sslechoserver/sslechoserver.pro
index 2663872..2663872 100644
--- a/examples/sslechoserver/sslechoserver.pro
+++ b/examples/websockets/sslechoserver/sslechoserver.pro
diff --git a/examples/websockets/websockets.pro b/examples/websockets/websockets.pro
new file mode 100644
index 0000000..76a0e9f
--- /dev/null
+++ b/examples/websockets/websockets.pro
@@ -0,0 +1,12 @@
+TEMPLATE = subdirs
+
+SUBDIRS = echoclient \
+ echoserver \
+ simplechat
+qtHaveModule(quick): SUBDIRS += qmlwebsocketclient
+
+contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
+SUBDIRS += \
+ sslechoserver \
+ sslechoclient
+}
diff --git a/src/websockets/doc/qtwebsockets.qdocconf b/src/websockets/doc/qtwebsockets.qdocconf
index 7822edc..db1553d 100644
--- a/src/websockets/doc/qtwebsockets.qdocconf
+++ b/src/websockets/doc/qtwebsockets.qdocconf
@@ -48,9 +48,11 @@ sourcedirs += .. \
../../imports
-exampledirs += ../../../examples/ \
+exampledirs += ../../../examples/websockets \
snippets
+manifestmeta.thumbnail.names += "QtWebSockets/*"
+
navigation.landingpage = "Qt WebSockets"
navigation.cppclassespage = "Qt WebSockets C++ Classes"
navigation.qmltypespage = "Qt WebSockets QML Types"
diff --git a/src/websockets/doc/src/index.qdoc b/src/websockets/doc/src/index.qdoc
index 2961ef3..1d05585 100644
--- a/src/websockets/doc/src/index.qdoc
+++ b/src/websockets/doc/src/index.qdoc
@@ -58,7 +58,6 @@
\section1 Examples
- The module provides the following examples as a guide to using
+ The module provides the following \l{Qt WebSockets Examples}{Examples} as a guide to using
the API.
- \l{Qt WebSockets Examples}{Examples}
*/
diff --git a/src/websockets/qmaskgenerator.cpp b/src/websockets/qmaskgenerator.cpp
index 04f5e1e..09305ab 100644
--- a/src/websockets/qmaskgenerator.cpp
+++ b/src/websockets/qmaskgenerator.cpp
@@ -46,9 +46,9 @@
\brief The QMaskGenerator class provides an abstract base for custom 32-bit mask generators.
- The WebSockets specification as outlined in {http://tools.ietf.org/html/rfc6455}{RFC 6455}
- requires that all communication from client to server must be masked. This is to prevent
- malicious scripts to attack bad behaving proxies.
+ The WebSockets specification as outlined in \l {http://tools.ietf.org/html/rfc6455}{RFC 6455}
+ requires that all communication from client to server be masked. This is to prevent
+ malicious scripts from attacking badly behaving proxies.
For more information about the importance of good masking,
see \l {http://w2spconf.com/2011/papers/websocket.pdf}.
By default QWebSocket uses the cryptographically insecure qrand() function.
diff --git a/src/websockets/qwebsocket.cpp b/src/websockets/qwebsocket.cpp
index 85b45c0..825d66c 100644
--- a/src/websockets/qwebsocket.cpp
+++ b/src/websockets/qwebsocket.cpp
@@ -143,7 +143,7 @@ not been filled in with new information when the signal returns.
This signal is emitted whenever QWebSocket's state changes.
The \a state parameter is the new state.
- \note QAbstractSocket::ConnectedState is emitted after the handshake has
+ \note QAbstractSocket::ConnectedState is emitted after the handshake
with the server has succeeded.
QAbstractSocket::SocketState is not a registered metatype, so for queued
@@ -168,7 +168,7 @@ not been filled in with new information when the signal returns.
\note This signal has the same meaning both for secure and non-secure websockets.
As opposed to QSslSocket, bytesWritten() is only emitted when encrypted data is effectively
- written (see QSslSocket:encryptedBytesWritten()).
+ written (see QSslSocket::encryptedBytesWritten()).
\sa close()
*/
@@ -266,7 +266,7 @@ QT_BEGIN_NAMESPACE
* \brief Creates a new QWebSocket with the given \a origin,
* the \a version of the protocol to use and \a parent.
*
- * The \a origin of the client is as specified \l {http://tools.ietf.org/html/rfc6454}{RFC 6454}.
+ * The \a origin of the client is as specified in \l {http://tools.ietf.org/html/rfc6454}{RFC 6454}.
* (The \a origin is not required for non-web browser clients
* (see \l {http://tools.ietf.org/html/rfc6455}{RFC 6455})).
* The \a origin may not contain new line characters, otherwise the connection will be
@@ -496,7 +496,7 @@ QSslConfiguration QWebSocket::sslConfiguration() const
#endif //not QT_NO_SSL
/*!
- \brief Returns the version the socket is currently using
+ \brief Returns the version the socket is currently using.
*/
QWebSocketProtocol::Version QWebSocket::version() const
{
@@ -523,7 +523,7 @@ QUrl QWebSocket::requestUrl() const
}
/*!
- \brief Returns the current origin
+ \brief Returns the current origin.
*/
QString QWebSocket::origin() const
{
@@ -552,7 +552,7 @@ QString QWebSocket::closeReason() const
}
/*!
- \brief Returns the current state of the socket
+ \brief Returns the current state of the socket.
*/
QAbstractSocket::SocketState QWebSocket::state() const
{
@@ -703,7 +703,7 @@ void QWebSocket::setPauseMode(QAbstractSocket::PauseModes pauseMode)
Exceptionally, a buffer size of 0 means that the read buffer is unlimited and
all incoming data is buffered. This is the default.
This option is useful if you only read the data at certain points in time
- (e.g., in a real-time streaming application) or if you want to protect your socket against
+ (for example, in a real-time streaming application) or if you want to protect your socket against
receiving too much data, which may eventually cause your application to run out of memory.
\sa readBufferSize()
diff --git a/src/websockets/qwebsocket.h b/src/websockets/qwebsocket.h
index c6de981..bf85cc0 100644
--- a/src/websockets/qwebsocket.h
+++ b/src/websockets/qwebsocket.h
@@ -43,6 +43,7 @@
#define QWEBSOCKET_H
#include <QtCore/QUrl>
+#include <QtNetwork/QAbstractSocket>
#ifndef QT_NO_NETWORKPROXY
#include <QtNetwork/QNetworkProxy>
#endif
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index c51ba38..fb6486e 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -78,9 +78,10 @@ QWebSocketConfiguration::QWebSocketConfiguration() :
m_ignoredSslErrors(),
m_ignoreSslErrors(false),
#endif
-#ifndef QT_NONETWORKPROXY
- m_proxy(QNetworkProxy::DefaultProxy)
+#ifndef QT_NO_NETWORKPROXY
+ m_proxy(QNetworkProxy::DefaultProxy),
#endif
+ m_pSocket(Q_NULLPTR)
{
}
@@ -541,8 +542,10 @@ void QWebSocketPrivate::makeConnections(const QTcpSocket *pTcpSocket)
QObject::connect(pTcpSocket,
static_cast<ASErrorSignal>(&QAbstractSocket::error),
q, static_cast<WSErrorSignal>(&QWebSocket::error));
+#ifndef QT_NO_NETWORKPROXY
QObject::connect(pTcpSocket, &QAbstractSocket::proxyAuthenticationRequired, q,
&QWebSocket::proxyAuthenticationRequired);
+#endif
QObject::connect(pTcpSocket, &QAbstractSocket::readChannelFinished, q,
&QWebSocket::readChannelFinished);
QObject::connect(pTcpSocket, &QAbstractSocket::aboutToClose, q, &QWebSocket::aboutToClose);
diff --git a/src/websockets/qwebsocket_p.h b/src/websockets/qwebsocket_p.h
index b24d540..5c65450 100644
--- a/src/websockets/qwebsocket_p.h
+++ b/src/websockets/qwebsocket_p.h
@@ -91,7 +91,7 @@ public:
QList<QSslError> m_ignoredSslErrors;
bool m_ignoreSslErrors;
#endif
-#ifndef QT_NONETWORKPROXY
+#ifndef QT_NO_NETWORKPROXY
QNetworkProxy m_proxy;
#endif
QTcpSocket *m_pSocket;
diff --git a/src/websockets/qwebsocketcorsauthenticator.cpp b/src/websockets/qwebsocketcorsauthenticator.cpp
index be126ef..fd4bb8c 100644
--- a/src/websockets/qwebsocketcorsauthenticator.cpp
+++ b/src/websockets/qwebsocketcorsauthenticator.cpp
@@ -52,7 +52,7 @@
It provides applications with fine-grained control over which origin URLs are allowed
and which aren't.
By default, every origin is accepted.
- To get fine grained control, an application connects the
+ To get fine-grained control, an application connects the
\l{QWebSocketServer::}{originAuthenticationRequired()} signal to a slot.
When the origin (QWebSocketCorsAuthenticator::origin()) is accepted,
it calls QWebSocketCorsAuthenticator::setAllowed(true)
@@ -95,14 +95,14 @@ QWebSocketCorsAuthenticator::QWebSocketCorsAuthenticator(const QString &origin)
}
/*!
- Destroys the object
+ Destroys the object.
*/
QWebSocketCorsAuthenticator::~QWebSocketCorsAuthenticator()
{
}
/*!
- Constructs a copy of \a other
+ Constructs a copy of \a other.
*/
QWebSocketCorsAuthenticator::QWebSocketCorsAuthenticator(const QWebSocketCorsAuthenticator &other) :
d_ptr(new QWebSocketCorsAuthenticatorPrivate(other.d_ptr->m_origin, other.d_ptr->m_isAllowed))
@@ -110,7 +110,7 @@ QWebSocketCorsAuthenticator::QWebSocketCorsAuthenticator(const QWebSocketCorsAut
}
/*!
- Assigns \a other to this authenticator object
+ Assigns \a other to this authenticator object.
*/
QWebSocketCorsAuthenticator &
QWebSocketCorsAuthenticator::operator =(const QWebSocketCorsAuthenticator &other)
diff --git a/src/websockets/qwebsocketserver.cpp b/src/websockets/qwebsocketserver.cpp
index 884f422..58c3cc9 100644
--- a/src/websockets/qwebsocketserver.cpp
+++ b/src/websockets/qwebsocketserver.cpp
@@ -79,9 +79,7 @@
QWebSocketServer only supports version 13 of the WebSocket protocol, as outlined in RFC 6455.
- \sa echoserver.html
-
- \sa QWebSocket
+ \sa {WebSocket Server Example}, QWebSocket
*/
/*!
@@ -122,8 +120,8 @@
/*!
\fn void QWebSocketServer::acceptError(QAbstractSocket::SocketError socketError)
- This signal is emitted when accepting a new connection results in an error.
- The \a socketError parameter describes the type of error that occurred
+ This signal is emitted when the acceptance of a new connection results in an error.
+ The \a socketError parameter describes the type of error that occurred.
\sa pauseAccepting(), resumeAccepting()
*/
@@ -145,7 +143,7 @@
/*!
\fn void QWebSocketServer::closed()
- This signal is emitted when the server closed it's connection.
+ This signal is emitted when the server closed its connection.
\sa close()
*/
@@ -155,7 +153,7 @@
This signal is emitted when a new connection is requested.
The slot connected to this signal should indicate whether the origin
(which can be determined by the origin() call) is allowed in the \a authenticator object
- (by issuing \l{QWebSocketCorsAuthenticator::}{setAllowed()})
+ (by issuing \l{QWebSocketCorsAuthenticator::}{setAllowed()}).
If no slot is connected to this signal, all origins will be accepted by default.
@@ -172,7 +170,7 @@
usually an indication that QWebSocketServer is unable to securely identify the
peer.
- This signal provides you with an early indication when something's wrong.
+ This signal provides you with an early indication when something is 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
@@ -221,7 +219,7 @@ QT_BEGIN_NAMESPACE
/*!
Constructs a new QWebSocketServer with the given \a serverName.
- The \a serverName will be used in the http handshake phase to identify the server.
+ The \a serverName will be used in the HTTP handshake phase to identify the server.
It can be empty, in which case an empty server name will be sent to the client.
The \a secureMode parameter indicates whether the server operates over wss (\l{SecureMode})
or over ws (\l{NonSecureMode}).
@@ -331,7 +329,7 @@ int QWebSocketServer::maxPendingConnections() const
/*!
Returns the next pending connection as a connected QWebSocket object.
QWebSocketServer does not take ownership of the returned QWebSocket object.
- It is up to the caller to delete the object explicitly when it is done using it,
+ It is up to the caller to delete the object explicitly when it will no longer be used,
otherwise a memory leak will occur.
Q_NULLPTR is returned if this function is called when there are no pending connections.
@@ -424,7 +422,7 @@ void QWebSocketServer::resumeAccepting()
}
/*!
- Sets the server name that will be used during the http handshake phase to the given
+ Sets the server name that will be used during the HTTP handshake phase to the given
\a serverName.
The \a serverName can be empty, in which case an empty server name will be sent to the client.
Existing connected clients will not be notified of this change, only newly connecting clients