Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. WebSocket draft?
Forum Updated to NodeBB v4.3 + New Features

WebSocket draft?

Scheduled Pinned Locked Moved Qt WebKit
11 Posts 3 Posters 5.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    ThibautV
    wrote on last edited by
    #1

    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 '1

    which 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:25899

    I 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

    1 Reply Last reply
    0
    • F Offline
      F Offline
      fonzi337
      wrote on last edited by
      #2

      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?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        ThibautV
        wrote on last edited by
        #3

        Hi fonzi337,

        Actually, I found that the specifications used, seem to be these ones:
        http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75

        It is still old. But it works...

        1 Reply Last reply
        0
        • F Offline
          F Offline
          fonzi337
          wrote on last edited by
          #4

          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!

          1 Reply Last reply
          0
          • T Offline
            T Offline
            ThibautV
            wrote on last edited by
            #5

            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...

            1 Reply Last reply
            0
            • F Offline
              F Offline
              fonzi337
              wrote on last edited by
              #6

              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?

              1 Reply Last reply
              0
              • T Offline
                T Offline
                ThibautV
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  fonzi337
                  wrote on last edited by
                  #8

                  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...

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    ThibautV
                    wrote on last edited by
                    #9

                    sure no problem.

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kurt.pattyn
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0
                      • K Offline
                        K Offline
                        kurt.pattyn
                        wrote on last edited by
                        #11

                        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]

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved