[Development] [Feature Request] Add QtWebSockets to Qt

Steve Gold steveg2357 at gmail.com
Sat Dec 21 16:20:44 CET 2013

On further consideration, I also recommend that the open and close methods 
in QQmlWebSocket be public Q_INVOKABLE and any open/close testing logic in 
setUrl be moved to the open and close methods, reducing the need for 
additional error handling in the setUrl method. I also don't understand why 
sendTextMessage is a Q_SLOT and not a Q_INVOKABLE method.



-----Original Message----- 
From: Steve Gold
Sent: Friday, December 20, 2013 6:29 PM
To: Development at qt-project.org
Subject: Re: [Development] [Feature Request] Add QtWebSockets to Qt

I don't know who gets an "official" vote but I am in favor of making
QtWebSockets part of the official Qt repository and would like to see it
included in the next 5.2.1 release.

Since I consider it to be 'Qt-worthy' but almost 'QML-worthy', I recommend
that a public Q_INVOKABLE disconnect() method be added to the QQmlWebSocket
class with error handling and that error handling be improved in the setUrl,
open, close and setTextMessage methods, among others. These methods could
return a bool value, use try/catch or a combination.

Let me know what you think of these suggestions.



-----Original Message----- 
From: Kurt Pattyn
Sent: Friday, December 20, 2013 5:07 PM
To: development at qt-project.org
Subject: [Development] [Feature Request] Add QtWebSockets to Qt


I propose to move QtWebSockets from the playground
(https://qt.gitorious.org/qtplayground/websockets/) to the official Qt
repository as an add-on.
As there is a need for a websockets implementation in Qt (see
https://bugreports.qt-project.org/browse/QTBUG-26300 and
https://bugreports.qt-project.org/browse/QTBUG-26298), QtWebSockets could be
a welcome addition.

The module only depends on Qt (core and network, and Qml for the Qml
It supports the ws and wss schemes, and can be used as a client and server
The API is modelled after QAbstractSocket and QTcpSocket, and hence should
be familiar for Qt developers. The Qml module has been reviewed by Alan
Alpert, and is considered 'QML-worthy'. Currently, the module builds as a Qt
add-on, and can be used by adding QT += websockets.

QtWebSockets passes the Autobahn Testsuite (see
http://autobahn.ws/testsuite/), has extensive unit tests, and builds
successfully on the Qt CI infrastructure. Performance has also been tested
with AutoBahn TestSuite, and is up-to-par with all current browsers and
websocketpp (even slightly faster).

Please cast your votes.


Development mailing list
Development at qt-project.org

More information about the Development mailing list