Kurt Pattyn [Tue, 4 Feb 2014 11:29:40 +0000 (12:29 +0100)]
Use QObjectPrivate instead of dedicated d-ptr
Change-Id: I3f69a2b0ca81e1e003200bb8e0a337b9532e64a0
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Mon, 3 Feb 2014 00:34:46 +0000 (01:34 +0100)]
Replace delete loop with qDeleteAll
Change-Id: If63acc08307c0a411072a2a37ac52661e7e02594
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Kurt Pattyn [Mon, 3 Feb 2014 00:40:33 +0000 (01:40 +0100)]
Remove superfluous Q_REQUIRED_RESULT
Change-Id: Ie4e01a82082c45918b55e8588c7322dd359ba8c1
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 2 Feb 2014 00:08:49 +0000 (01:08 +0100)]
Comment out QML component
Commented out QWebSocket QML component because there is
still discussion regarding its API.
Change-Id: I9a0699e19186f7e9761517fd127ac8a5263c745f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Kurt Pattyn [Sun, 2 Feb 2014 22:38:45 +0000 (23:38 +0100)]
Add cleanup to examples
Change-Id: I28b9007a6d35575b11a608645930fa2ed71e7c7c
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 2 Feb 2014 22:39:25 +0000 (23:39 +0100)]
Update documentation
Change-Id: I2fb9b20fc316b8b9ed0e1c0b52c4e44882d7f9d5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 2 Feb 2014 17:36:33 +0000 (18:36 +0100)]
Add unit tests for QWebSocketServer
Change-Id: I9ca38aad22a757437943a72669b7ca2bb5db6b98
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 26 Jan 2014 17:18:11 +0000 (18:18 +0100)]
Add unit tests for QWebSocket
Added basic unit tests for QWebSocket. Connectivity is not tested yet.
Change-Id: I38d388d289733777e6ff0253e5b201aca99b0b10
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 2 Feb 2014 17:34:02 +0000 (18:34 +0100)]
Remove parenting of QWebSockets in QWebSocketServer
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>
Kurt Pattyn [Sun, 2 Feb 2014 17:25:42 +0000 (18:25 +0100)]
Check return value of listen and set appropriate error and description
Change-Id: I2309a51d873812cdc590b5d846a84024b6e28857
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 2 Feb 2014 17:22:15 +0000 (18:22 +0100)]
Add private method to set error from QAbstractSocket::error
Change-Id: I870006bbd5c788bea89f65d5bd25082d1543caf0
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 2 Feb 2014 17:40:31 +0000 (18:40 +0100)]
Correct include path
Change-Id: I7929337d16485a4ec9e95d1eb6037c84634b672f
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 2 Feb 2014 17:39:30 +0000 (18:39 +0100)]
Remove qWarning statements
Change-Id: I7132b8c9b15f625345ef092be3bc0ea466a12f8e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 2 Feb 2014 17:38:19 +0000 (18:38 +0100)]
Update documentation
Change-Id: I35829436b3be543fd133cab58118e62ddfb0e291
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 26 Jan 2014 17:05:42 +0000 (18:05 +0100)]
Allow writes only when socket is in connected state
Change-Id: I3e265ccba334301444611a8013568ba52cca5bcd
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 25 Jan 2014 18:42:36 +0000 (19:42 +0100)]
Rename ProcessMessage to ProcessTextMessage
Renamed to ProcessTextMessage to be consistent with
ProcessBinaryMessage and with the method names in
the SslEchoServer example.
Change-Id: Iaaa732221597a08fca079e8df4df941d673d16a6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 26 Jan 2014 17:04:05 +0000 (18:04 +0100)]
Adapt isValid to only return true when socket is in connected state
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>
Kurt Pattyn [Sun, 26 Jan 2014 16:54:51 +0000 (17:54 +0100)]
Set default error and errorstring
Set the default error and error string to match those of QAbstractSocket.
Change-Id: I96277ecda1f56da4de7509a22bcab86df8064e7c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Kurt Pattyn [Sun, 26 Jan 2014 16:48:07 +0000 (17:48 +0100)]
Locally cache read buffer size and pause mode
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>
Kurt Pattyn [Sat, 25 Jan 2014 19:09:24 +0000 (20:09 +0100)]
Add TODOs for improvements
Change-Id: Ifc8cef479147de9fdd9c382ff09be21056cb3e68
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Kurt Pattyn [Sun, 26 Jan 2014 00:44:46 +0000 (01:44 +0100)]
Move versionFromString() from public to private API
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>
Kurt Pattyn [Sat, 25 Jan 2014 19:08:17 +0000 (20:08 +0100)]
Cleanup inline comments
Change-Id: I8d96bb2b5c1cf211de50939dc2141572750a4b70
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Kurt Pattyn [Sun, 26 Jan 2014 00:49:53 +0000 (01:49 +0100)]
Move CORS authenticator test to non-private tests
QWebSocketCorsAuthenticator is a public class and hence needs to be
tested with the public API of QtWebSockets.
Change-Id: If3af0744d8901f9c6c13d5fb9061ebf0a5a8d163
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Kurt Pattyn [Sun, 26 Jan 2014 16:30:32 +0000 (17:30 +0100)]
Remove socketOption functionality
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>
Kurt Pattyn [Sat, 25 Jan 2014 13:48:20 +0000 (14:48 +0100)]
Update documentation
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>
Kurt Pattyn [Sat, 25 Jan 2014 13:44:50 +0000 (14:44 +0100)]
Removed unsupported functionality
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>
Milian Wolff [Fri, 31 Jan 2014 13:17:13 +0000 (14:17 +0100)]
Remove unconditional debug output.
Change-Id: Iad653d78ef2d6345474d260d2d44d013b66466ff
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 25 Jan 2014 21:14:42 +0000 (22:14 +0100)]
Fix wrong comparison
Fixed a wrong comparison leading to a non-functional server.
Change-Id: Icc47bfe3a1346169b8590d9a935f8d4bec5102ba
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 19 Jan 2014 13:04:07 +0000 (14:04 +0100)]
Rename processMessage to processTextMessage
Renamed processMessage to be more inline with
processBinaryMessage.
Change-Id: Ib0c8b9a4999756105f894d7ca5df88452495a66b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 19 Jan 2014 13:11:27 +0000 (14:11 +0100)]
Small fix to error text
Change-Id: Ie46b5ad5892e55a20ba00bdf659d2395c40f95c3
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 19 Jan 2014 12:58:30 +0000 (13:58 +0100)]
Rename SecureMode to SslMode
Renamed SecureMode to SslMode to be more inline with
QSslSocket.
Change-Id: Id2f0c5ebc1e06fcd7b0ce5059e88520e5f0e6fe5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 19 Jan 2014 12:43:52 +0000 (13:43 +0100)]
Rename write methods
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>
Kurt Pattyn [Sun, 19 Jan 2014 11:17:20 +0000 (12:17 +0100)]
Bump module version to 5.3.0
Change-Id: I93120dafc1457de8b24774a81a4303d71974063e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 18 Jan 2014 15:21:39 +0000 (16:21 +0100)]
Remove dubious functions
Change-Id: Ida5c46e3e42685f5e78f2aee657d12af62286810
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 18 Jan 2014 21:02:11 +0000 (22:02 +0100)]
Use QStringLiteral where appropriate
Change-Id: I608b555428aceafd7761a882cd4bd1fdb50d19b3
Reviewed-by: Richard J. Moore <rich@kde.org>
Kurt Pattyn [Sun, 19 Jan 2014 13:09:47 +0000 (14:09 +0100)]
Cleanup documentation
Limited line length to 100 characters
Change-Id: Id51c72cb4e7091478bdb57b45514e89f3a6565dd
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 18 Jan 2014 20:38:06 +0000 (21:38 +0100)]
Consume return value of write function
Change-Id: Ia5d950f539f87f2f81e111f26e77960be456017e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 18 Jan 2014 20:16:23 +0000 (21:16 +0100)]
Use new connect syntax
Change-Id: I0b48c6cba12902d910c4f586fa105a13d084a437
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 18 Jan 2014 19:50:48 +0000 (20:50 +0100)]
Limit line length to 100 chars per line
Change-Id: I2a91033c9882ca54c6fcf26d9eb5a3c91f9e0f7d
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 18 Jan 2014 21:14:39 +0000 (22:14 +0100)]
Move currentVersion method to private namespace
Change-Id: I49c952e8c71018fab2e48ade27f1f9c19279acb5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 18 Jan 2014 18:14:08 +0000 (19:14 +0100)]
Rename enumerations to comply with Qt style
Change-Id: Id72fe27cec606e7f02b8e9ac1d0d763890e86a95
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 18 Jan 2014 18:15:43 +0000 (19:15 +0100)]
Add reference to related feature report
Change-Id: Iba4aa2db5a2967865ff731134e6514d6649bcafb
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Sat, 18 Jan 2014 00:32:30 +0000 (01:32 +0100)]
Use QString() instead of QStringLiteral("")
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>
Frederik Gladhorn [Sat, 18 Jan 2014 01:33:18 +0000 (02:33 +0100)]
Make single argument ctor explicit
Change-Id: Idf4933cb9caa0e33ee72948390d2b6d98c241fc5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Fri, 17 Jan 2014 18:44:13 +0000 (19:44 +0100)]
one if (m_mustMask) is enough
Change-Id: I6cb89b981b70f10510319bfb51b77874e2a4d85a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Fri, 17 Jan 2014 18:32:08 +0000 (19:32 +0100)]
No warnings means we can use CONFIG += warning_clean
This will use werror to keep the module clean.
Change-Id: I6229ff593d1263e30feee474636a35e87d38c4e6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Fri, 17 Jan 2014 17:20:40 +0000 (18:20 +0100)]
Add a few more const refs
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>
Frederik Gladhorn [Fri, 17 Jan 2014 18:28:38 +0000 (19:28 +0100)]
Fix warning
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>
Frederik Gladhorn [Fri, 17 Jan 2014 18:08:39 +0000 (19:08 +0100)]
Fix docs after adding const refs
Change-Id: I9fc1d996584c1136efca4412fe76c570cc4201ec
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Thu, 9 Jan 2014 18:51:07 +0000 (19:51 +0100)]
Fix typo (passive requires past participle)
Change-Id: I3792ccb9fa40042d0a5912a3723bfbf23b867f73
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Fri, 17 Jan 2014 10:23:16 +0000 (11:23 +0100)]
Use const ref in public signals
Change-Id: I2846f668848395a820aabcc0359bcda2979bde1e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Fri, 17 Jan 2014 10:04:41 +0000 (11:04 +0100)]
Make sure that the random generator is initialized in all code paths
Change-Id: Ice4826e7670cffa791250a95387ac1121ddc4089
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Fri, 17 Jan 2014 11:39:05 +0000 (12:39 +0100)]
Simplify handshake reading functions
Change-Id: I000243e717b79972caa676ff10f68901904f28c9
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Laszlo Agocs [Fri, 17 Jan 2014 09:11:33 +0000 (10:11 +0100)]
Remove doc reference to non-existent function
Change-Id: I309104e808cd6749d8f9430fcbcf170c78056730
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 12 Jan 2014 15:09:08 +0000 (16:09 +0100)]
Remove _p suffix from cpp filenames.
Change-Id: I425aa372fe2f4114939f2691f270644e66017276
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Mon, 13 Jan 2014 10:23:56 +0000 (11:23 +0100)]
Move OpCode out of public API
Change-Id: Ic0b34b684d6f9ca98789304ead1cf8b993422d02
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Mon, 13 Jan 2014 10:28:21 +0000 (11:28 +0100)]
Update documentation
Change-Id: I98cab390cbb0f19741d6fa4ae5b0ada8d19d1f5f
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Mon, 13 Jan 2014 10:20:39 +0000 (11:20 +0100)]
Use new connect syntax
Change-Id: Idd002ff72d27e5b549600704ae0e857bd021f5d1
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 12 Jan 2014 19:28:07 +0000 (20:28 +0100)]
Limit line length to 100 characters.
Change-Id: I9da963570b174b9a5a33e65cf144402677b4bab5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 11 Jan 2014 18:15:16 +0000 (19:15 +0100)]
Replace emit by Q_EMIT
Change-Id: I8543a74a9b3c8c1b45d9e0e12223072b6637199b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 11 Jan 2014 18:08:28 +0000 (19:08 +0100)]
Remove waitXXX() methods from websockets
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>
Frederik Gladhorn [Thu, 9 Jan 2014 18:22:20 +0000 (19:22 +0100)]
Enable docs for QWebSocketProtocol
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>
Frederik Gladhorn [Thu, 9 Jan 2014 18:06:18 +0000 (19:06 +0100)]
Link qml documentation and make it visible in creator
Change-Id: I39cd6aab1eb7dd154bc41a211984396540b6979c
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Thu, 9 Jan 2014 18:05:38 +0000 (19:05 +0100)]
Fix typo
Change-Id: Ie7a6724b6075ed50f30072e637780234ee7fe48c
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Frederik Gladhorn [Thu, 9 Jan 2014 17:10:59 +0000 (18:10 +0100)]
Use new connect syntax in a few places
Change-Id: Iff0bd801a2dc4cce9b867e9a83320d0f9a716ab3
Reviewed-by: Steven Ceuppens <steven.ceuppens@icloud.com>
Kurt Pattyn [Sat, 4 Jan 2014 14:44:44 +0000 (15:44 +0100)]
Correct whitespace
Change-Id: I9cefb6139c41317ba2eb1453b66411132efbee6a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 4 Jan 2014 14:43:53 +0000 (15:43 +0100)]
Check on max pending connections before accepting a connection
Change-Id: Ia94540e131ce424e6306886861598f7f24f7577f
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 4 Jan 2014 12:57:19 +0000 (13:57 +0100)]
Add clarification in documentation
Change-Id: Ib616c4c932cb2797036d2d821af7726fcfe2f877
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 4 Jan 2014 12:56:01 +0000 (13:56 +0100)]
Adapt to Qt coding style
Change-Id: I137ac180b19228e0a5683e21ca87e3fe2db9f97b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Fri, 27 Dec 2013 13:51:36 +0000 (14:51 +0100)]
Add Qml documentation
Change-Id: I38bfb0d87614fee1d508567a014a41e4be8cf6c2
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Fri, 27 Dec 2013 12:25:49 +0000 (13:25 +0100)]
Add limitation to write() methods
Change-Id: I5e1176711885ff698b9c05034785adc9a0612ccc
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 22 Dec 2013 17:24:21 +0000 (18:24 +0100)]
Add optimizations
Change-Id: Icd293f832e2d7a6272d4953c1994065d16222375
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Laszlo Papp [Sun, 22 Dec 2013 18:15:01 +0000 (18:15 +0000)]
Add CMake unit tests for WebSockets
Change-Id: I1e1218d42880191439ed06f82d0053b0d9642b1c
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Laszlo Papp [Sun, 22 Dec 2013 17:54:18 +0000 (17:54 +0000)]
Fix the documentation by using the qdocconf term around
Change-Id: I8a999c27b71e23d5090d45c900ad3c3492e43668
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 22 Dec 2013 16:15:51 +0000 (17:15 +0100)]
Add extra documentation
Change-Id: I1a3c0571faeabf2d05bc144628d186e5ff039014
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 7 Dec 2013 12:10:44 +0000 (13:10 +0100)]
Cleanup whitespace
Change-Id: Iaf5501838662b5f0191c21c608149a9348ce1c05
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 22 Dec 2013 11:40:53 +0000 (12:40 +0100)]
Fix SSL examples
Only include ssl examples when ssl is enabled in Qt
Change-Id: I1ab8ec068980c0b6b9f19b47d05ae8fee3d17e79
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 7 Dec 2013 11:54:09 +0000 (12:54 +0100)]
Cleanup code to comply with Qt style
- 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>
Kurt Pattyn [Sun, 17 Nov 2013 14:20:08 +0000 (15:20 +0100)]
Add QML websockets plugin
Change-Id: I9454cf339f8af5515d3a91667d8c8ded3659d18b
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Kurt Pattyn [Mon, 18 Nov 2013 22:52:09 +0000 (23:52 +0100)]
Wrap SECURE_MODE in ifdef statements
Change-Id: Ie936ea7db14ed34fa0cb53030447bba6cbc83a4e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Mon, 18 Nov 2013 20:03:15 +0000 (21:03 +0100)]
Change open method so that a web socket can be reopened
Change-Id: I1c7059a8e581ce5179c00f187b03f59fbed63ba6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 17 Nov 2013 14:30:34 +0000 (15:30 +0100)]
Add close code and close reason getter functions
Change-Id: I4eeab1521054e4f4921d25c6a990eeb7486443cb
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Thu, 7 Nov 2013 12:44:02 +0000 (13:44 +0100)]
Wrap ssl implementation in ifdef statement
Change-Id: I8ad6a7f29e639fd4e908acc6d3c2f8a393c72001
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Wed, 6 Nov 2013 20:53:55 +0000 (21:53 +0100)]
Add NON_SECURE_MODE parameter to QWebSocketServer constructor
Change-Id: I9e2e892b67490061f08d03b87a8dc3de288a09e5
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Wed, 6 Nov 2013 20:39:38 +0000 (21:39 +0100)]
Change url to localhost
Change-Id: I6a33add4244d78e703f1d0c8ae39d42017383b26
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Wed, 6 Nov 2013 19:00:39 +0000 (20:00 +0100)]
Add sslEchoClient and sslEchoServer examples
Add license headers
Change-Id: Ied74cb3db6ceed6c3f361e4afac860a7a3fb7676
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Wed, 6 Nov 2013 12:20:16 +0000 (13:20 +0100)]
Sanitize include directives
Change-Id: I510e5e8f263d3ea08dd3d623b054d06b2911c6d6
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Wed, 6 Nov 2013 10:28:16 +0000 (11:28 +0100)]
Add html client for echo server example
Change-Id: I1d6c47c9fc5e68f8eabf92db5a91e645319572fb
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Wed, 6 Nov 2013 09:49:04 +0000 (10:49 +0100)]
Add chat server example
Change-Id: Iec7e9be0d2e397737ab12b898ac31bca200f05c1
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Mon, 4 Nov 2013 20:29:56 +0000 (21:29 +0100)]
Add QtWebSockets/ directory to include to remove compiler warning
Ubuntu qtlibinfix build generates a warning that qwbsockets_global.h
should be prefixed with QtWebSockets/
Change-Id: I3de7e359e5c0d856ca8c4486abb3fe745ab7d2cd
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Mon, 4 Nov 2013 20:16:58 +0000 (21:16 +0100)]
Add QWebSocketConfiguration to pre-cache socket settings
Change-Id: Ibff22b277b89379dc31b0b7a8a02547e12bff58e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 3 Nov 2013 20:25:16 +0000 (21:25 +0100)]
Put fixed string length in test data
Change-Id: I01e24b17656278c77de431c5df49d2bbd996ee89
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 3 Nov 2013 19:51:58 +0000 (20:51 +0100)]
Use escape sequences to make VS happy
Change-Id: I78dd73537e53ce5346b3a342c7a5d654cf9afb36
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 3 Nov 2013 19:39:37 +0000 (20:39 +0100)]
Convert string from utf8 to make VS happy
Change-Id: I5cc2c3d0ffe237c6c0bf3f7ef37d28e08c2fd02e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 3 Nov 2013 19:07:20 +0000 (20:07 +0100)]
Remove memory access error
Change-Id: I72d689c08b89be72e6bcb8171aa40812f3c77250
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 3 Nov 2013 14:59:08 +0000 (15:59 +0100)]
Change masking to octet based processing
Change-Id: I1b450bf35760e8a5157cb1013f4668815640be5d
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 3 Nov 2013 14:19:57 +0000 (15:19 +0100)]
Use alignment on 4-byte boundary for masking input
Change-Id: I8efea21179245e8d8ed8095c327aef69676e2e1a
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sun, 3 Nov 2013 12:28:14 +0000 (13:28 +0100)]
Improve speed of masking
Change-Id: Ieb1b28ac2ae37453da5b365587b8ab0e183ae269
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 2 Nov 2013 20:46:50 +0000 (21:46 +0100)]
Make mask explicitly big endian
Change-Id: I3ed5fa7322ae71d9350f4c1fa835f07117ea125e
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Kurt Pattyn [Sat, 2 Nov 2013 18:59:09 +0000 (19:59 +0100)]
Correct cast
Change-Id: Ic87115f738ec50fbf7d63a5483dd25b1e451348b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>