summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocketserver_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Add a function to hand off a tcp socket to the websocket serverAleksey Lysenko2017-01-271-0/+3
| | | | | | | | | | | | | This method allows a listening port to process connections with different protocols. It lets the websocket server handle a TCP socket, upgrading it to a websocket [ChangeLog][QWebSocketServer] Add support to handle external QTcpSocket Done-with: André Klitzing <aklitzing@gmail.com> Task-number: QTBUG-54276 Change-Id: Ia36b481dc87d6f3806e9f1e61e75e528640f1937 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Delete disconnected socketAleksey Lysenko2016-12-131-1/+1
| | | | | | | | | | | Method onSocketDisconnected has never been called, so WebSocketServer did not handle closed connection properly. Moreover, socket was not freed in time and this led to increase in memory consumption Task-number: QTBUG-56414 Change-Id: Ib57f5b88413ffeef4f296a260245ba0a8d25adb2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
* Updated license headersAntti Kokko2016-01-201-14/+20
| | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I8c17da1f7e2f0a620e3627fa7f8087f185545c8a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-6/+6
| | | | | | | | | | 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>
* Update license headers and add new license filesv5.4.0-alpha1Antti Kokko2014-08-241-18/+10
| | | | | | | - Added LICENSE.LGPLv3, LICENSE.GPLv2 & LICENSE.LGPLv21 Change-Id: I0586e35a7aa99be1b5b3bda580b05897f451acbf Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Rename websockets.pro -> qtwebsockets.proSergio Ahumada2014-02-161-0/+1
| | | | | Change-Id: Ia42316304a37d151b678a9922071bbb090ec87b5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Adapt copyright headerKurt Pattyn2014-02-151-1/+1
| | | | | Change-Id: I9773492d3673d8aabdb4dd178be6af12eca7ba74 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Do not try to invoke/emit signal on shutdown.Milian Wolff2014-02-061-1/+1
| | | | | | | | | | | | | I'm actually not sure whether this is the right way to do this, but when the object is destroyed, we cannot delay the signal emit. In that case, we just don't emit it at all. This is the old behavior minus the warning: QWARN : tst_QWebSocketServer::tst_initialisation() QMetaObject::invokeMethod: No such method QObject::closed() Change-Id: I0513dd693ef7bfc43621e24361e72e90204fbea3 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Do not access QObject API before its private data is initialized.Milian Wolff2014-02-061-0/+1
| | | | | | | | | | | | 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>
* Use QObjectPrivate instead of dedicated d-ptrKurt Pattyn2014-02-051-11/+9
| | | | | Change-Id: I3f69a2b0ca81e1e003200bb8e0a337b9532e64a0 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add private method to set error from QAbstractSocket::errorKurt Pattyn2014-02-021-0/+2
| | | | | Change-Id: I870006bbd5c788bea89f65d5bd25082d1543caf0 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename SecureMode to SslModeKurt Pattyn2014-01-201-6/+6
| | | | | | | | Renamed SecureMode to SslMode to be more inline with QSslSocket. Change-Id: Id2f0c5ebc1e06fcd7b0ce5059e88520e5f0e6fe5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename enumerations to comply with Qt styleKurt Pattyn2014-01-181-2/+2
| | | | | Change-Id: Id72fe27cec606e7f02b8e9ac1d0d763890e86a95 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add a few more const refsFrederik Gladhorn2014-01-181-1/+1
| | | | | | | | | In case of processPing we need to make a copy that potentially detaches when masking is requested, but pings are < 125 bytes. Before this code would copy the byte array in the same way much earlier. Change-Id: If0592bb4b508eeb11fdbf05c4bb98b9679ed0549 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Limit line length to 100 characters.Kurt Pattyn2014-01-121-1/+3
| | | | | Change-Id: I9da963570b174b9a5a33e65cf144402677b4bab5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove waitXXX() methods from websocketsKurt Pattyn2014-01-111-1/+0
| | | | | | | | | | | | | 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>
* Cleanup code to comply with Qt styleKurt Pattyn2013-12-101-3/+7
| | | | | | | | | | | | | | - 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>
* Add sslEchoClient and sslEchoServer examplesKurt Pattyn2013-11-061-3/+19
| | | | | | | Add license headers Change-Id: Ied74cb3db6ceed6c3f361e4afac860a7a3fb7676 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Sanitize include directivesKurt Pattyn2013-11-061-4/+4
| | | | | Change-Id: I510e5e8f263d3ea08dd3d623b054d06b2911c6d6 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add correct license headersKurt Pattyn2013-11-011-18/+40
| | | | | Change-Id: I789cd780697aedbca7a90a5991df00b2c7e9ec98 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Replace int with qintptr for socket descriptorKurt Pattyn2013-11-011-2/+2
| | | | | Change-Id: Ie554b90a62c504e3ef54fd2d36e93806f4871f81 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Replaced getter methods of HandshakeResponse to be in line with QtKurt Pattyn2013-10-141-1/+1
| | | | | Change-Id: I23d9e75413c04a8a2f43ea0b940a0bab33d8d8de Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
* make use of the new Q_NULLPTR keyword & shorten if(ptr) conditionsSteven Ceuppens2013-10-111-1/+1
| | | | | Change-Id: I4a71909134032d10b398ede74c431964bce7d675 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* update class & filenamesSteven Ceuppens2013-09-291-1/+2
| | | | | Change-Id: Idd2caa074f2f3feba99714bf6927ca879809ad47 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Changes to integrate the websocket module as a full Qt Add-On moduleSteven Ceuppens2013-09-281-0/+101
- 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>