summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Update documentationKurt Pattyn2014-02-031-15/+15
| | | | | Change-Id: I2fb9b20fc316b8b9ed0e1c0b52c4e44882d7f9d5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add unit tests for QWebSocketServerKurt Pattyn2014-02-021-0/+2
| | | | | Change-Id: I9ca38aad22a757437943a72669b7ca2bb5db6b98 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove parenting of QWebSockets in QWebSocketServerKurt Pattyn2014-02-021-1/+0
| | | | | | | | Because QWebSocketServer took ownership of QWebSocket objects, the objects were double deleted, leading to crashes. Change-Id: I51192daba8e8739bc68a94c7fe2a8a972ac9d38e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Check return value of listen and set appropriate error and descriptionKurt Pattyn2014-02-021-1/+4
| | | | | Change-Id: I2309a51d873812cdc590b5d846a84024b6e28857 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add private method to set error from QAbstractSocket::errorKurt Pattyn2014-02-022-0/+12
| | | | | Change-Id: I870006bbd5c788bea89f65d5bd25082d1543caf0 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Correct include pathKurt Pattyn2014-02-021-1/+1
| | | | | Change-Id: I7929337d16485a4ec9e95d1eb6037c84634b672f Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove qWarning statementsKurt Pattyn2014-02-021-4/+0
| | | | | Change-Id: I7132b8c9b15f625345ef092be3bc0ea466a12f8e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Update documentationKurt Pattyn2014-02-021-2/+5
| | | | | Change-Id: I35829436b3be543fd133cab58118e62ddfb0e291 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Allow writes only when socket is in connected stateKurt Pattyn2014-02-011-1/+1
| | | | | Change-Id: I3e265ccba334301444611a8013568ba52cca5bcd Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Adapt isValid to only return true when socket is in connected stateKurt Pattyn2014-02-012-2/+4
| | | | | | | | 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>
* Set default error and errorstringKurt Pattyn2014-02-011-2/+2
| | | | | | | Set the default error and error string to match those of QAbstractSocket. Change-Id: I96277ecda1f56da4de7509a22bcab86df8064e7c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Locally cache read buffer size and pause modeKurt Pattyn2014-02-012-10/+16
| | | | | | | | | When calling setReadBufferSize() and setPauseMode(), the internal socket is not yet created. So we cache these values and apply them when the internal socket is created. Change-Id: I4299232342438c7a6c52fa8ea4a95461b3f85ebf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add TODOs for improvementsKurt Pattyn2014-02-012-0/+4
| | | | | Change-Id: Ifc8cef479147de9fdd9c382ff09be21056cb3e68 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Move versionFromString() from public to private APIKurt Pattyn2014-02-013-2/+2
| | | | | | | | This method is only necessary for processing of handshakes and hence is not needed in the public API. Change-Id: I6bb2327337600523a136fb394275c31b9819f631 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Cleanup inline commentsKurt Pattyn2014-02-011-3/+2
| | | | | Change-Id: I8d96bb2b5c1cf211de50939dc2141572750a4b70 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Remove socketOption functionalityKurt Pattyn2014-02-014-44/+0
| | | | | | | | | | 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>
* Update documentationKurt Pattyn2014-02-014-6/+28
| | | | | | | | 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 unsupported functionalityKurt Pattyn2014-02-014-40/+0
| | | | | | | | | | 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>
* Remove unconditional debug output.Milian Wolff2014-02-011-1/+0
| | | | | Change-Id: Iad653d78ef2d6345474d260d2d44d013b66466ff Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix wrong comparisonKurt Pattyn2014-01-251-1/+2
| | | | | | | Fixed a wrong comparison leading to a non-functional server. Change-Id: Icc47bfe3a1346169b8590d9a935f8d4bec5102ba Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename processMessage to processTextMessageKurt Pattyn2014-01-211-2/+2
| | | | | | | | Renamed processMessage to be more inline with processBinaryMessage. Change-Id: Ib0c8b9a4999756105f894d7ca5df88452495a66b Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Small fix to error textKurt Pattyn2014-01-201-1/+1
| | | | | Change-Id: Ie46b5ad5892e55a20ba00bdf659d2395c40f95c3 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename SecureMode to SslModeKurt Pattyn2014-01-204-38/+38
| | | | | | | | Renamed SecureMode to SslMode to be more inline with QSslSocket. Change-Id: Id2f0c5ebc1e06fcd7b0ce5059e88520e5f0e6fe5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename write methodsKurt Pattyn2014-01-205-11/+15
| | | | | | | | | 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>
* Bump module version to 5.3.0Kurt Pattyn2014-01-201-1/+1
| | | | | Change-Id: I93120dafc1457de8b24774a81a4303d71974063e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove dubious functionsKurt Pattyn2014-01-204-60/+0
| | | | | Change-Id: Ida5c46e3e42685f5e78f2aee657d12af62286810 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use QStringLiteral where appropriateKurt Pattyn2014-01-201-1/+1
| | | | | Change-Id: I608b555428aceafd7761a882cd4bd1fdb50d19b3 Reviewed-by: Richard J. Moore <rich@kde.org>
* Cleanup documentationKurt Pattyn2014-01-201-1/+2
| | | | | | | Limited line length to 100 characters Change-Id: Id51c72cb4e7091478bdb57b45514e89f3a6565dd Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Move currentVersion method to private namespaceKurt Pattyn2014-01-203-2/+3
| | | | | Change-Id: I49c952e8c71018fab2e48ade27f1f9c19279acb5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Rename enumerations to comply with Qt styleKurt Pattyn2014-01-1812-187/+193
| | | | | Change-Id: Id72fe27cec606e7f02b8e9ac1d0d763890e86a95 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add reference to related feature reportKurt Pattyn2014-01-181-0/+1
| | | | | Change-Id: Iba4aa2db5a2967865ff731134e6514d6649bcafb Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use QString() instead of QStringLiteral("")Frederik Gladhorn2014-01-182-13/+13
| | | | | | | | | | And do the same for QByteArray. Instantiating the default constructor uses QArrayData::sharedNull() for the d-pointer which is the cheapest constructor in memory and instructions. Change-Id: I1ceaafbc0c0cb1ccc5690edba89ea1100f30b3cd Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Make single argument ctor explicitFrederik Gladhorn2014-01-181-2/+2
| | | | | Change-Id: Idf4933cb9caa0e33ee72948390d2b6d98c241fc5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* one if (m_mustMask) is enoughFrederik Gladhorn2014-01-181-4/+4
| | | | | Change-Id: I6cb89b981b70f10510319bfb51b77874e2a4d85a Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Add a few more const refsFrederik Gladhorn2014-01-187-24/+24
| | | | | | | | | 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>
* Fix warningFrederik Gladhorn2014-01-181-1/+2
| | | | | | | | | | | warning: ignoring return value of 'qint64 QWebSocketPrivate::writeFrame(const QByteArray&)', declared with attribute warn_unused_result [-Wunused-result] For pings the result is not relevant since they are one frame only. Change-Id: Iaf958e3e1a333f8d3c0b0f9ba56f7ab58e4900f9 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix docs after adding const refsFrederik Gladhorn2014-01-171-5/+5
| | | | | Change-Id: I9fc1d996584c1136efca4412fe76c570cc4201ec Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Fix typo (passive requires past participle)Frederik Gladhorn2014-01-171-1/+1
| | | | | Change-Id: I3792ccb9fa40042d0a5912a3723bfbf23b867f73 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use const ref in public signalsFrederik Gladhorn2014-01-171-5/+5
| | | | | | Change-Id: I2846f668848395a820aabcc0359bcda2979bde1e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Make sure that the random generator is initialized in all code pathsFrederik Gladhorn2014-01-172-3/+12
| | | | | Change-Id: Ice4826e7670cffa791250a95387ac1121ddc4089 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Simplify handshake reading functionsFrederik Gladhorn2014-01-173-22/+9
| | | | | Change-Id: I000243e717b79972caa676ff10f68901904f28c9 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove doc reference to non-existent functionLaszlo Agocs2014-01-171-1/+0
| | | | | Change-Id: I309104e808cd6749d8f9430fcbcf170c78056730 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove _p suffix from cpp filenames.Kurt Pattyn2014-01-136-5/+5
| | | | | Change-Id: I425aa372fe2f4114939f2691f270644e66017276 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Move OpCode out of public APIKurt Pattyn2014-01-134-21/+23
| | | | | Change-Id: Ic0b34b684d6f9ca98789304ead1cf8b993422d02 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Update documentationKurt Pattyn2014-01-132-4/+33
| | | | | Change-Id: I98cab390cbb0f19741d6fa4ae5b0ada8d19d1f5f Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Use new connect syntaxKurt Pattyn2014-01-133-18/+25
| | | | | Change-Id: Idd002ff72d27e5b549600704ae0e857bd021f5d1 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Limit line length to 100 characters.Kurt Pattyn2014-01-1218-251/+476
| | | | | Change-Id: I9da963570b174b9a5a33e65cf144402677b4bab5 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Replace emit by Q_EMITKurt Pattyn2014-01-111-4/+4
| | | | | Change-Id: I8543a74a9b3c8c1b45d9e0e12223072b6637199b Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
* Remove waitXXX() methods from websocketsKurt Pattyn2014-01-118-96/+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>
* Enable docs for QWebSocketProtocolFrederik Gladhorn2014-01-112-13/+13
| | | | | | | | | | There is no advantage to haveing the cpp files have _p.cpp and as the public docs are in this file, rename it. In order to have the docs generated there needs to be a namespace page. Change-Id: Id6ef10ba39b7ea8b18d5d8e1cde03e566e682926 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>