WebSocket draft?
-
Hi,
I'm looking for the specifications used in the implementation of the websockets.
Right now , here is what I have:
When I call in [removed] var socket = new Websocket("ws://localhost:25899");
With Chrome 14:
GET / HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: localhost:25899
Origin: null
Sec-WebSocket-Key1: M2O 5sCU88?36 10 %zc7 6
Sec-WebSocket-Key2: 1534([ ^ 3t S W Kn3*\n 74 3 '1which are these specs: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10
With QtWebkit:
GET / HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: localhost:25899
Origin: http://localhost:25899I couldn't find the specifications that match this.
Is there a chance that it would be updated with the latest specifications? If yes, when would that be?
Thanks for your help
-
I too am interested in this. Any chance a C++/Qt implementation of the websockets protocol will be included in Qt 5? What's Qt's general roadmap for websockets support?
-
Hi fonzi337,
Actually, I found that the specifications used, seem to be these ones:
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75It is still old. But it works...
-
Thanks ThibautV. I'm curious though: what QtWebKit classes do you use for communicating with websockets? I found "this":http://gitorious.org/qtwebsocket that implements a websocket server in Qt, but I'm wondering if you are using QtWebKit classes that do this for you making use of the version of the specification that you linked to. So far, all I've found is an implementation like the above where the websockets protocol is manually implemented on top of QTcpSocket. Perhaps I'm missing a class that you're using that already does this for you.
Thanks!
-
Hi,
Actually, I have a specific server which handles the websocket itself. It does not use any QtWebKit classes for websocket. And sorry but I do not know if Qt provides any classes for that...
-
Thanks ThibautV. So is your application Qt-based? Do you have a Qt component that interacts with your websocket server? If so, what do you use in the Qt component for this interaction? QTcpSocket? Something else?
-
Sorry, I worked on the server side only and it is not qt based. The client side is, which is why I needed to get the specs used, but I didn't work on it so I can't be very helpful here... :s
-
Ah ok, no problem. If you ever find out how the client side was done, please let me know as I don't want to reinvent the wheel by writing my own websocket implementation on top of QTcpSocket if there is an easier solution...
-
sure no problem.
-
You can have a look at "QWebSockets":http://github.com/KurtPattyn/QWebSockets/, which is a native implementation of web sockets (RFC6455). Can be used both client and server side.
-
The project has been moved to the official Qt repository and is about to be included in Qt 5.3. It can be found here: https://qt.gitorious.org/qt/qtwebsockets
[quote author="KurtPattyn" date="1376466764"]You can have a look at "QWebSockets":http://github.com/KurtPattyn/QWebSockets/, which is a native implementation of web sockets (RFC6455). Can be used both client and server side.
[/quote]