summaryrefslogtreecommitdiff
path: root/tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QWebsocket doesn't receive message with size larger than 1MRyan Chu2019-08-281-2/+2
| | | | | | | | | | | | If the processing of QWebSocketFrame is not done and waiting for more data, QWebSocketPrivate::processData should return the control and wait for next readyRead signal. Continue the change of b2fc794ffaf48c9d9c401b54cf39ea0220617a27 Change-Id: Idf5af0710267e59e63b8e234d6dab5843d821696 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove waitForReadyRead from QWebSocketFrame::readFrameRyan Chu2019-08-231-1/+35
| | | | | | | | | | | | | | Asynchronously process socket frame in QWebSocketDataProcessor::process. If the processing of QWebSocketFrame is not done and waiting for more data, QWebSocketDataProcessor::process will return the control and wait for next readyRead signal to continue processing the unfinished socket frame. QWebSocketDataProcessor::process gets timeout after 5 seconds, and then an errorEncountered signal will be emitted. Fixes: QTBUG-74464 Change-Id: I03b7f874c1c266617e7eadf59c59ae43fa8540ce Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use nullptr instead of 0Jesus Fernandez2018-08-101-1/+1
| | | | | | Change-Id: Ibad1bbb351d14ab0de140875d2969b7da483eb21 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-071-0/+29
|\ | | | | | | Change-Id: Iffe66da51d3b7b38d04ca3c185b3b003b157f886
| * Limit Close frame to 125 bytesMårten Nordheim2018-08-061-0/+29
| | | | | | | | | | | | | | | | | | | | | | All control frames should be limited to 125 frames. https://tools.ietf.org/html/rfc6455#section-5.5 Task-number: QTBUG-62949 Change-Id: Id9b5a431faab6ff6edf7dc2e5c3525e999bc04ea Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* | QWebSocket: Add 'bytesToWrite'Mårten Nordheim2018-04-141-0/+8
|/ | | | | | | | | | | | | | | | Add the well-known 'bytesToWrite' function to QWebSocket. Previously the only way to know how many bytes were left to be written was to make a guesstimate on the overhead your message would get and then keep track of the amount sent using the 'bytesWritten' signal. The tests compare using '>' because there is overhead from the headers. [ChangeLog][QWebSocket] Added the bytesToWrite function to QWebSocket. Call this function to see how many bytes are left to write. Change-Id: I82f17a98b582ee3bc02f0c47597b4a6717761f12 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* test: fix tst_QWebSocket::tst_moveToThread()Liang Qi2017-10-261-2/+2
| | | | | | Task-number: QTBUG-63707 Change-Id: Iaba78256f790bc422790a03fccb841e6e6482fc1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-261-1/+1
| | | | | Change-Id: I0988a4119b5bd790d286c16b5647d97d4d95aef0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Updated license headersAntti Kokko2016-01-201-17/+12
| | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I191cd4111d18052fbe80bbe21bf851bf4795a1a6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Test: replace obsolete QUrl::addQueryItem()Liang Qi2015-10-211-1/+3
| | | | | Change-Id: I266b98d309a8912efb988a4c7a006d6fefb48531 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-201-0/+103
|\ | | | | | | Change-Id: I8d2c4b0982623839b880a9d8fbe7f5ee69d33ad3
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-201-1/+1
| |\ | | | | | | | | | Change-Id: I7b56e21fa93d0d196887e8dfa683050f3a032186
| | * Test: stablize tst_QWebSocket::tst_moveToThread()5.5Liang Qi2015-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For e8335d48, the test is flaky, but old CI treated it as a PASS. Task-number: QTBUG-48843 Change-Id: I4d2c0d270824d7b1e954e9174493fba2c1c5433f Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-0/+103
| |\ \ | | |/ | | | | | | | | | | | | | | | Conflicts: tests/auto/websockets/qwebsocket/tst_qwebsocket.cpp Change-Id: Ie4184b0788b6a0a5a85ca8e4d1547c33f7027ca0
| | * Set parent of internal socket objectsPeter Kümmel2015-09-041-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0.Friedemann Kleint2015-08-311-2/+6
|/ / | | | | | | | | | | | | Fix usage of API that is marked deprecated. Change-Id: Ie1bd25b22a8bd4faa6885ac3670dcc3c25c17ab2 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-301-12/+34
|/ | | | | | | | Conflicts: .qmake.conf src/websockets/qwebsocket_p.cpp Change-Id: Ibcc1898263cc8bc80066370f045df6a217e46574
* tests: move all auto tests to websockets sub directoryLiang Qi2015-05-221-0/+605
cmake is not included. Change-Id: I9ab6244d8b6b3752f26070b0b15ae70c0cab6d82 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>