summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSze Howe Koh <szehowe.koh@gmail.com>2014-04-02 20:18:13 +0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-09 04:01:17 +0200
commitc8da97458d4f8003beea00d8ba9791e3551be171 (patch)
treecf07232e1f31c01d06644648d3c34d6aa4fca4e0 /src
parent02529e4d9ae2b17c0f15f7f05681f6385bfaa05a (diff)
downloadqtwebsockets-c8da97458d4f8003beea00d8ba9791e3551be171.tar.gz
Use the proper protocol names
- "WebSocket" is one word, with uppercase 'W' and 'S'. - "HTTP"/"HTTPS" is fully uppercase Change-Id: Ice3a50c94394433c97f7347291af5cda69b234ce Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp2
-rw-r--r--src/imports/qmlwebsockets/qmlwebsockets_plugin.h2
-rw-r--r--src/websockets/qwebsocket.cpp16
-rw-r--r--src/websockets/qwebsocket_p.cpp4
-rw-r--r--src/websockets/qwebsocketdataprocessor.cpp2
-rw-r--r--src/websockets/qwebsocketframe.cpp4
-rw-r--r--src/websockets/qwebsocketprotocol.cpp4
-rw-r--r--src/websockets/qwebsocketserver.cpp22
-rw-r--r--src/websockets/qwebsocketserver_p.cpp2
9 files changed, 29 insertions, 29 deletions
diff --git a/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp b/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
index d407196..a36aeac 100644
--- a/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
+++ b/src/imports/qmlwebsockets/qmlwebsockets_plugin.cpp
@@ -45,7 +45,7 @@
QT_BEGIN_NAMESPACE
-void QmlWebsocket_plugin::registerTypes(const char *uri)
+void QmlWebSocket_plugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("Qt.WebSockets"));
diff --git a/src/imports/qmlwebsockets/qmlwebsockets_plugin.h b/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
index cd663a5..1cab587 100644
--- a/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
+++ b/src/imports/qmlwebsockets/qmlwebsockets_plugin.h
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
-class QmlWebsocket_plugin : public QQmlExtensionPlugin
+class QmlWebSocket_plugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
diff --git a/src/websockets/qwebsocket.cpp b/src/websockets/qwebsocket.cpp
index 825d66c..f53d3d7 100644
--- a/src/websockets/qwebsocket.cpp
+++ b/src/websockets/qwebsocket.cpp
@@ -43,7 +43,7 @@
\class QWebSocket
\inmodule QtWebSockets
- \brief Implements a TCP socket that talks the websocket protocol.
+ \brief Implements a TCP socket that talks the WebSocket protocol.
WebSockets is a web technology providing full-duplex communications channels over
a single TCP connection.
@@ -60,9 +60,9 @@
QWebSocket only supports version 13 of the WebSocket protocol, as outlined in
\l {http://tools.ietf.org/html/rfc6455}{RFC 6455}.
- \note Some proxies do not understand certain HTTP headers used during a web socket handshake.
- In that case, non-secure web socket connections fail. The best way to mitigate against
- this problem is to use web sockets over a secure connection.
+ \note Some proxies do not understand certain HTTP headers used during a WebSocket handshake.
+ In that case, non-secure WebSocket connections fail. The best way to mitigate against
+ this problem is to use WebSocket over a secure connection.
\warning To generate masks, this implementation of WebSockets uses the cryptographically
insecure qrand() function.
@@ -81,11 +81,11 @@
/*!
\page echoclient.html example
\title QWebSocket client example
- \brief A sample websocket client that sends a message and displays the message that
+ \brief A sample WebSocket client that sends a message and displays the message that
it receives back.
\section1 Description
- The EchoClient example implements a web socket client that sends a message to a websocket server
+ The EchoClient example implements a WebSocket client that sends a message to a WebSocket server
and dumps the answer that it gets back.
This example should ideally be used with the EchoServer example.
\section1 Code
@@ -166,7 +166,7 @@ not been filled in with new information when the signal returns.
This signal is emitted every time a payload of data has been written to the socket.
The \a bytes argument is set to the number of bytes that were written in this payload.
- \note This signal has the same meaning both for secure and non-secure websockets.
+ \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()).
\sa close()
@@ -388,7 +388,7 @@ void QWebSocket::close(QWebSocketProtocol::CloseCode closeCode, const QString &r
}
/*!
- \brief Opens a websocket connection using the given \a url.
+ \brief Opens a WebSocket connection using the given \a url.
If the url contains newline characters (\\r\\n), then the error signal will be emitted
with QAbstractSocket::ConnectionRefusedError as error type.
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index fb6486e..7555eca 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -440,7 +440,7 @@ void QWebSocketPrivate::open(const QUrl &url, bool mask)
}
} else {
const QString message =
- QWebSocket::tr("Unsupported websockets scheme: %1").arg(url.scheme());
+ QWebSocket::tr("Unsupported WebSocket scheme: %1").arg(url.scheme());
setErrorString(message);
Q_EMIT q->error(QAbstractSocket::UnsupportedSocketOperationError);
}
@@ -463,7 +463,7 @@ void QWebSocketPrivate::ping(const QByteArray &payload)
/*!
\internal
- Sets the version to use for the websocket protocol;
+ Sets the version to use for the WebSocket protocol;
this must be set before the socket is opened.
*/
void QWebSocketPrivate::setVersion(QWebSocketProtocol::Version version)
diff --git a/src/websockets/qwebsocketdataprocessor.cpp b/src/websockets/qwebsocketdataprocessor.cpp
index db9aa88..83a1a26 100644
--- a/src/websockets/qwebsocketdataprocessor.cpp
+++ b/src/websockets/qwebsocketdataprocessor.cpp
@@ -41,7 +41,7 @@
/*!
\class QWebSocketDataProcessor
The class QWebSocketDataProcessor is responsible for reading, validating and
- interpreting data from a websocket.
+ interpreting data from a WebSocket.
It reads data from a QIODevice, validates it against RFC 6455, and parses it into
frames (data, control).
It emits signals that correspond to the type of the frame: textFrameReceived(),
diff --git a/src/websockets/qwebsocketframe.cpp b/src/websockets/qwebsocketframe.cpp
index 431710c..e48308f 100644
--- a/src/websockets/qwebsocketframe.cpp
+++ b/src/websockets/qwebsocketframe.cpp
@@ -42,7 +42,7 @@
/*!
\class QWebSocketFrame
The class QWebSocketFrame is responsible for reading, validating and
- interpreting frames from a websocket.
+ interpreting frames from a WebSocket.
It reads data from a QIODevice, validates it against RFC 6455, and parses it into a
frame (data, control).
Whenever an error is detected, isValid() returns false.
@@ -336,7 +336,7 @@ QWebSocketFrame QWebSocketFrame::readFrame(QIODevice *pIoDevice)
switch (processingState) {
case PS_WAIT_FOR_MORE_DATA:
//TODO: waitForReadyRead should really be changed
- //now, when a websocket is used in a GUI thread
+ //now, when a WebSocket is used in a GUI thread
//the GUI will hang for at most 5 seconds
//maybe, a QStateMachine should be used
if (!pIoDevice->waitForReadyRead(5000)) {
diff --git a/src/websockets/qwebsocketprotocol.cpp b/src/websockets/qwebsocketprotocol.cpp
index a5e45c4..46a84ec 100644
--- a/src/websockets/qwebsocketprotocol.cpp
+++ b/src/websockets/qwebsocketprotocol.cpp
@@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
\inmodule QtWebSockets
- \brief The different defined versions of the Websocket protocol.
+ \brief The different defined versions of the WebSocket protocol.
For an overview of the differences between the different protocols, see
<http://code.google.com/p/pywebsocket/wiki/WebSocketProtocolSpec>
@@ -162,7 +162,7 @@ QT_BEGIN_NAMESPACE
/*!
\fn QWebSocketProtocol::isCloseCodeValid(int closeCode)
- Checks if \a closeCode is a valid web socket close code
+ Checks if \a closeCode is a valid WebSocket close code
\internal
*/
diff --git a/src/websockets/qwebsocketserver.cpp b/src/websockets/qwebsocketserver.cpp
index 58c3cc9..20aa009 100644
--- a/src/websockets/qwebsocketserver.cpp
+++ b/src/websockets/qwebsocketserver.cpp
@@ -44,11 +44,11 @@
\inmodule QtWebSockets
- \brief Implements a websocket-based server.
+ \brief Implements a WebSocket-based server.
It is modeled after QTcpServer, and behaves the same. So, if you know how to use QTcpServer,
you know how to use QWebSocketServer.
- This class makes it possible to accept incoming websocket connections.
+ This class makes it possible to accept incoming WebSocket connections.
You can specify the port or have QWebSocketServer pick one automatically.
You can listen on a specific address or on all the machine's addresses.
Call listen() to have the server listen for incoming connections.
@@ -72,9 +72,9 @@
\note When working with self-signed certificates, FireFox currently has a
\l {https://bugzilla.mozilla.org/show_bug.cgi?id=594502} {bug} that prevents it to
- connect to a secure websocket server. To work around this problem, first browse to the
- secure websocket server using https. FireFox will indicate that the certificate is invalid.
- From here on, the certificate can be added to the exceptions. After this, the secure websockets
+ connect to a secure WebSocket server. To work around this problem, first browse to the
+ secure WebSocket server using HTTPS. FireFox will indicate that the certificate is invalid.
+ From here on, the certificate can be added to the exceptions. After this, the secure WebSockets
connection should work.
QWebSocketServer only supports version 13 of the WebSocket protocol, as outlined in RFC 6455.
@@ -85,10 +85,10 @@
/*!
\page echoserver.html example
\title WebSocket server example
- \brief A sample websocket server echoing back messages sent to it.
+ \brief A sample WebSocket server echoing back messages sent to it.
\section1 Description
- The echoserver example implements a web socket server that echoes back everything that is sent
+ The echoserver example implements a WebSocket server that echoes back everything that is sent
to it.
\section1 Code
We start by creating a QWebSocketServer (`new QWebSocketServer()`). After the creation, we listen
@@ -96,7 +96,7 @@
\snippet echoserver/echoserver.cpp constructor
If listening is successful, we connect the `newConnection()` signal to the slot
`onNewConnection()`.
- The `newConnection()` signal will be thrown whenever a new web socket client is connected to our
+ The `newConnection()` signal will be thrown whenever a new WebSocket client is connected to our
server.
\snippet echoserver/echoserver.cpp onNewConnection
@@ -128,7 +128,7 @@
/*!
\fn void QWebSocketServer::serverError(QWebSocketProtocol::CloseCode closeCode)
- This signal is emitted when an error occurs during the setup of a web socket connection.
+ This signal is emitted when an error occurs during the setup of a WebSocket connection.
The \a closeCode parameter describes the type of error that occurred
\sa errorString()
@@ -503,7 +503,7 @@ quint16 QWebSocketServer::serverPort() const
QWebSocketServer will emit the error() signal with
the QWebSocketProtocol::CloseCodeAbnormalDisconnection close code
when the maximum of connections has been reached.
- The websocket handshake will fail and the socket will be closed.
+ The WebSocket handshake will fail and the socket will be closed.
\sa maxPendingConnections(), hasPendingConnections()
*/
@@ -543,7 +543,7 @@ int QWebSocketServer::socketDescriptor() const
}
/*!
- Returns a list of websocket versions that this server is supporting.
+ Returns a list of WebSocket versions that this server is supporting.
*/
QList<QWebSocketProtocol::Version> QWebSocketServer::supportedVersions() const
{
diff --git a/src/websockets/qwebsocketserver_p.cpp b/src/websockets/qwebsocketserver_p.cpp
index f349dc2..de3d04d 100644
--- a/src/websockets/qwebsocketserver_p.cpp
+++ b/src/websockets/qwebsocketserver_p.cpp
@@ -435,7 +435,7 @@ void QWebSocketServerPrivate::handshakeReceived()
pTcpSocket->close();
pTcpSocket->deleteLater();
qWarning() << QWebSocketServer::tr("Too many pending connections: " \
- "New websocket connection not accepted.");
+ "New WebSocket connection not accepted.");
setError(QWebSocketProtocol::CloseCodeAbnormalDisconnection,
QWebSocketServer::tr("Too many pending connections."));
return;