| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp
Change-Id: Ie4184b0788b6a0a5a85ca8e4d1547c33f7027ca0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After moving the websocket into another thread
current code doesn't work because then the QTcpSocket/QSslSocket
objects reside in a different thread, for instance:
"QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread"
QObject::moveToThread(QThread*) also moves QObjects's children,
therefore their internal socket objects need to be children of QWebSocket.
QWebSocket has ownership of the internal socket, and the
smart pointer is not needed any more.
Change of cleanup code to prevent crashes with clang/msvc builds:
QWebSocketPrivate is a scoped member of QObject (not QWebSocket)
and is destroyed after QObject destructor body was executed,
and so m_pSocket&co had already been destroyed (being children)
when the destructor of QWebSocketPrivate is called via the
scoped pointer.
Analogous to 64927e04f202d33b9a9a1f94141ef692c0b513ac
Change-Id: I1ade6cda3fa793c30332cc5e103025e2dda3c78c
Reviewed-by: Luca Niccoli <lultimouomo@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-40842
Change-Id: I02787a0e55701966e564a312d51297f4160bd89a
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
Request headers are not yet handled, only the QNetworkRequest::url() is
taken into consideration.
[ChangeLog][QWebSocket] Added open(const QNetworkRequest &) and request()
Task-number: QTBUG-40842
Change-Id: Ia2e10f22c79b0a085afb9a2eb8437b7a73d4a045
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I8467410bfad44e8d3fe6bd5724c61bb0c07c91f9
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1.) The websocket qml types page is now hooked into Qt's QML Type by Module
page.
2.) Correct incorrectly documented import statement for Qt.WebSockets
module in QML.
3.) Add missing \since tags (see QTBUG-36775).
Change-Id: I1321db70215fcd16cfbd77dd71a459244241d8a3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
|
|
|
|
|
|
|
| |
- Added LICENSE.LGPLv3, LICENSE.GPLv2 & LICENSE.LGPLv21
Change-Id: I0586e35a7aa99be1b5b3bda580b05897f451acbf
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
|
|
|
| |
- "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>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-37149
Change-Id: Ic0c28928404fc515de40e6fdff11849cdb2929d6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
|
|
|
|
|
| |
Change-Id: I8fca0df0ea66adba0898d95f8249ea1b7f33892a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I9773492d3673d8aabdb4dd178be6af12eca7ba74
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Created a QMaskGenerator abstract base class to serve as a basis for
user specific mask generators. Added the possibility to override the
default mask generation in QWebSocket.
Change-Id: Iaa02b44193f854d103b5f352617789175fe61f89
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
New line characters (\r\n) in the resource part of a url and in the origin
string can be used to forge the http header and can lead to insertion of
unwanted header entries. This can be an indication of an attack,
so QWebSocket immediately refuses a connection.
Change-Id: I9cdb309bfbe7025ad675925e6ea3e038476a1fd6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
|
| |
Removed the mask parameter because a web socket client does not have
a choice between masking and not masking.
Change-Id: I3c33acc235bb2a99476abb6201e6dbb6f881dd70
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inside the ctor of the private data, the QObject has not yet
been associated with the data. Thus, accessing it indirectly i.e.
to setup private signal/slot connections, will trigger crashes.
Now we delay accessing this API and call an init() function manually
in the parent QObject-inheriting class.
Change-Id: I2c3ce7335c54d42af6bce87de867ee0ef197efc6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I3f69a2b0ca81e1e003200bb8e0a337b9532e64a0
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
| |
Changed isValid() to only return true when the socket is also in connected
state. Also updated the documentation.
Change-Id: Id80dbc1f28c82bef19984c5ed7b34a7d474ee011
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Removed the setSocketOption() and socketOption(0 methods as they are
not really relevant for web sockets. Also, internally for the underlying real
socket the LowDelayOption and KeepAliveOption are already set.
If ever needed, these methods can be added later.
Change-Id: Ibfa279990c5277970eaa2dbc2dd3a7d0cce7154e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
| |
Clarified which versions are supported and that subprotocols
and extensions are not supported. Fixed some typos.
Change-Id: I99ef2fbbf74c287bea7d1b7a07881bf0542135ff
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Removed subprotocol and extension getter functionality, as this
is currently not supported by QtWebSockets. I left the backend
implementation intact (in the _p files), for future reference.
Change-Id: Ia00739f6f225cd557ceb10b40c83fc81d98aae0b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Renamed the write methods to sendTextMessage
and sendBinaryMessage respectively. This makes
the code more readable.
Change-Id: Ie49abf07a37f54c84bd01c5c788d2e42b28bcfdd
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: Ida5c46e3e42685f5e78f2aee657d12af62286810
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I9fc1d996584c1136efca4412fe76c570cc4201ec
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I309104e808cd6749d8f9430fcbcf170c78056730
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I9da963570b174b9a5a33e65cf144402677b4bab5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QWebSocketServer::waitForNewConnection() was just calling
QTcpServer::waitForNewConnection(), which was not correct because
a connection is only complete when the handshake succeeds.
Waiting for the handshake to complete would need a separate thread
for the handshake handling code, which would complicate the code a lot.
It was decided to leave out all waitXXX() methods from the module,
as it is easier to add this functionality later, then to remove it.
Change-Id: I778bae45b67f81e151ad2362f772c75e9f537ff0
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: Ib616c4c932cb2797036d2d821af7726fcfe2f877
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I5e1176711885ff698b9c05034785adc9a0612ccc
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I1a3c0571faeabf2d05bc144628d186e5ff039014
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Correct placement of curly braces
- Remove commented-out code
- Remove superfluous qDebug statements
- Add missing QT_BEGIN_NAMESPACE declarations
- Add move semantics
- Add cleanup handling to QWebSocketServerPrivate
- Add error handling to handshake response, QWebSocketServerPrivate,
QWebSocketServer, dataprocessor
Change-Id: I0690dc2c444fd6fc0db974d1459bf41bd8c31d40
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I4eeab1521054e4f4921d25c6a990eeb7486443cb
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I510e5e8f263d3ea08dd3d623b054d06b2911c6d6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I789cd780697aedbca7a90a5991df00b2c7e9ec98
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I9da90086c63b88a5664f241da2fa9687c3882ddf
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I81248b9af104c0b3d37c9cfcef250a102f4b1d32
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I1f96d5e4e327eae211fd6b458168e1f7607e2dcf
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I4a71909134032d10b398ede74c431964bce7d675
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: I6ffcc86b9bbc6efe27b7005a3df6f62f0d1a9293
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|
|
|
|
|
| |
Change-Id: Iee07585470404281daae768c2db745b65b036dba
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
|
|
- Changed project files to use Qt structure
- Moved existing sources into subdirectory, to make room for moduels
- Created a "import/qmlwebsocket" module skeleton (works, but needs to be extended)
- Modified examples to not use "include(.pri)", but use "QT += websocket"
- Added qml example skeleton (works, but no useful functionality yet)
Project can be build with:
$ qmake
$ make
$ make install
Module can be used in other projects with
QT += websockets
Change-Id: I2123026958b264670dbf8a978dee76edf5855806
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
|