| CMakeLists.txt |
|
1793 |
- |
| configure.cmake |
|
474 |
- |
| doc |
|
|
- |
| qdefaultmaskgenerator_p.cpp |
!
\class QDefaultMaskGenerator
\inmodule QtWebSockets
\brief The QDefaultMaskGenerator class provides the default mask generator for QtWebSockets.
The WebSockets specification as outlined in \l {RFC 6455}
requires that all communication from client to server must be masked. This is to prevent
malicious scripts to attack bad behaving proxies.
For more information about the importance of good masking,
see \l {"Talking to Yourself for Fun and Profit" by Lin-Shung Huang et al}.
The default mask generator uses the reasonably secure QRandomGenerator::global()->generate() function.
The best measure against attacks mentioned in the document above,
is to use QWebSocket over a secure connection (\e wss://).
In general, always be careful to not have 3rd party script access to
a QWebSocket in your application.
\internal
|
1995 |
- |
| qdefaultmaskgenerator_p.h |
|
1001 |
- |
| qmaskgenerator.cpp |
!
\class QMaskGenerator
\inmodule QtWebSockets
\since 5.3
\brief The QMaskGenerator class provides an abstract base for custom 32-bit mask generators.
The WebSockets specification as outlined in \l {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 {"Talking to Yourself for Fun and Profit" by Lin-Shung Huang et al}.
By default QWebSocket uses the reasonably secure QRandomGenerator::global()->generate() function.
The best measure against attacks mentioned in the document above,
is to use QWebSocket over a secure connection (\e wss://).
In general, always be careful to not have 3rd party script access to
a QWebSocket in your application.
|
1867 |
- |
| qmaskgenerator.h |
|
660 |
- |
| qwebsocket.cpp |
!
\class QWebSocket
\inmodule QtWebSockets
\since 5.3
\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.
The WebSocket protocol was standardized by the IETF as
\l {RFC 6455} in 2011.
QWebSocket can both be used in a client application and server application.
This class was modeled after QAbstractSocket.
QWebSocket currently does not support \l {WebSocket Extensions}.
QWebSocket only supports version 13 of the WebSocket protocol, as outlined in
\l {RFC 6455}.
\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 reasonably
secure QRandomGenerator::global()->generate() function.
For more information about the importance of good masking,
see \l {"Talking to Yourself for Fun and Profit" by Lin-Shung Huang et al}.
The best measure against attacks mentioned in the document above,
is to use QWebSocket over a secure connection (\e wss://).
In general, always be careful to not have 3rd party script access to
a QWebSocket in your application.
\sa QAbstractSocket, QTcpSocket
\sa {QWebSocket client example}
|
32076 |
- |
| qwebsocket.h |
|
5323 |
- |
| qwebsocket_p.cpp |
!
\internal
|
59708 |
- |
| qwebsocket_p.h |
|
8826 |
- |
| qwebsocket_wasm_p.cpp |
|
11508 |
- |
| qwebsocketcorsauthenticator.cpp |
!
\class QWebSocketCorsAuthenticator
\inmodule QtWebSockets
\since 5.3
\brief The QWebSocketCorsAuthenticator class provides an authenticator object for
Cross Origin Requests (CORS).
The QWebSocketCorsAuthenticator class is used in the
\l{QWebSocketServer::}{originAuthenticationRequired()} signal.
The class provides a way to pass back the required information to the QWebSocketServer.
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
\l{QWebSocketServer::}{originAuthenticationRequired()} signal to a slot.
When the origin (QWebSocketCorsAuthenticator::origin()) is accepted,
it calls QWebSocketCorsAuthenticator::setAllowed(true)
\note Checking on the origin does not make much sense when the server is accessed
via a non-browser client, as that client can set whatever origin header it likes.
In case of a browser client, the server SHOULD check the validity of the origin.
\sa {WebSocket Security Considerations}
\sa QWebSocketServer
|
4535 |
- |
| qwebsocketcorsauthenticator.h |
|
1260 |
- |
| qwebsocketcorsauthenticator_p.h |
|
900 |
- |
| qwebsocketdataprocessor.cpp |
!
\class QWebSocketDataProcessor
The class QWebSocketDataProcessor is responsible for reading, validating and
interpreting data from a WebSocket.
It reads data from a QIODevice, validates it against \l{RFC 6455}, and parses it into
frames (data, control).
It emits signals that correspond to the type of the frame: textFrameReceived(),
binaryFrameReceived(), textMessageReceived(), binaryMessageReceived(), pingReceived(),
pongReceived() and closeReceived().
Whenever an error is detected, the errorEncountered() signal is emitted.
QWebSocketDataProcessor also checks if a frame is allowed in a sequence of frames
(e.g. a continuation frame cannot follow a final frame).
This class is an internal class used by QWebSocketInternal for data processing and validation.
\sa Frame()
\internal
|
11748 |
- |
| qwebsocketdataprocessor_p.h |
|
3037 |
- |
| qwebsocketframe.cpp |
!
\class QWebSocketFrame
The class QWebSocketFrame is responsible for reading, validating and
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.
\note The QWebSocketFrame class does not look at valid sequences of frames.
It processes frames one at a time.
\note It is the QWebSocketDataProcessor that takes the sequence into account.
\sa QWebSocketDataProcessor
\internal
|
11279 |
- |
| qwebsocketframe_p.h |
|
2858 |
- |
| qwebsockethandshakeoptions.cpp |
!
\class QWebSocketHandshakeOptions
\inmodule QtWebSockets
\since 6.4
\brief Collects options for the WebSocket handshake.
QWebSocketHandshakeOptions collects options that are passed along to the
WebSocket handshake, such as WebSocket subprotocols and WebSocket
Extensions.
At the moment, only WebSocket subprotocols are supported.
\sa QWebSocket::open()
|
3046 |
- |
| qwebsockethandshakeoptions.h |
|
1795 |
- |
| qwebsockethandshakeoptions_p.h |
|
962 |
- |
| qwebsockethandshakerequest.cpp |
!
\brief Constructs a new QWebSocketHandshakeRequest given \a port and \a isSecure
\internal
|
7396 |
- |
| qwebsockethandshakerequest_p.h |
|
1873 |
- |
| qwebsockethandshakeresponse.cpp |
!
\internal
|
9165 |
- |
| qwebsockethandshakeresponse_p.h |
|
2800 |
- |
| qwebsocketprotocol.cpp |
!
\namespace QWebSocketProtocol
\inmodule QtWebSockets
\brief Contains constants related to the WebSocket standard.
\since 5.3
|
6448 |
- |
| qwebsocketprotocol.h |
|
1393 |
- |
| qwebsocketprotocol_p.h |
|
2045 |
- |
| qwebsockets_global.h |
|
373 |
- |
| qwebsocketserver.cpp |
!
\class QWebSocketServer
\inmodule QtWebSockets
\since 5.3
\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.
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.
The newConnection() signal is then emitted each time a client connects to the server.
Call nextPendingConnection() to accept the pending connection as a connected QWebSocket.
The function returns a pointer to a QWebSocket in QAbstractSocket::ConnectedState that you can
use for communicating with the client.
If an error occurs, serverError() returns the type of error, and errorString() can be called
to get a human readable description of what happened.
When listening for connections, the address and port on which the server is listening are
available as serverAddress() and serverPort().
Calling close() makes QWebSocketServer stop listening for incoming connections.
QWebSocketServer currently does not support \l {WebSocket Extensions}.
\note When working with self-signed certificates, \l{Firefox bug 594502} prevents \l{Firefox} 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
connection should work.
QWebSocketServer only supports version 13 of the WebSocket protocol, as outlined in \l{RFC 6455}.
There is a default connection handshake timeout of 10 seconds to avoid denial of service,
which can be customized using setHandshakeTimeout().
\sa {WebSocket Server Example}, QWebSocket
|
24777 |
- |
| qwebsocketserver.h |
|
4113 |
- |
| qwebsocketserver_p.cpp |
!
\internal
|
18871 |
- |
| qwebsocketserver_p.h |
|
3597 |
- |