Ohloh


The QWebSockets Open Source Project on Ohloh.

Advertisements

30 thoughts on “Ohloh

  1. Hi! I want to use your websocket implementation, it look great!. I want to know if you are planning to incorporate WSS feature and for when, roughly. Thanks you very much.

    • That is nice. Indeed I have plans to incorporate wss, but first I am making the implementation ready to be included in Qt. The wss feature will be implemented somewhere in September/October this year. See GitHub for the milestones.

  2. Is QWebSockets compatible with a server running node.js and using socket.io?
    When will QSocketio be available?
    What’s the difference between QWebSockets and QSocketio?
    Thanks

    • QWebSockets is compatible with any websockets compliant server.
      Socket.io is using its own protocol on top of websockets. As such, you need a socket.io aware client.
      QSocketIo is building upon QWebSockets to implement a socket.io client.
      Lately, I have been very busy, so I had not the time to publish to QSocketIo client yet. I will publish it in the days to come.

    • Hi Steveg,

      the first version of QSocketIo has been put into GitHub. It depends on the QtWebSockets module which can be found on https://qt.gitorious.org/qtplayground/websockets. Clone the websockets module, run qmake, make and make install. This will install QtWebSockets as a Qt module. Then in your project just include the qsocketio.pri file.
      Note that this code is still in production phase, and hasn’t been extensively tested.

  3. Kurt, I get the following error after I qmake and make. I’ve tried “qmake” and “qmake websockets.pro” with the same result.

    cd src\ && ( if not exist Makefile C:\Download\socketio\qwebsockets\qmake.exe C:\Download\socketio\qwebsockets\src\src.pro -o Makefile ) && make -f Makefile
    make[1]: Entering directory `C:/Download/socketio/qwebsockets/src’
    cd websockets\ && ( if not exist Makefile C:\Download\socketio\qwebsockets\qmake.exe C:\Download\socketio\qwebsockets\src\websockets\websockets.pro -o Makefile ) && make -f Makefile
    make[2]: Entering directory `C:/Download/socketio/qwebsockets/src/websockets’
    make -f Makefile.Release all
    make[3]: Entering directory `C:/Download/socketio/qwebsockets/src/websockets’
    Makefile.Release:91: *** missing separator. Stop.
    make[3]: Leaving directory `C:/Download/socketio/qwebsockets/src/websockets’
    make[2]: *** [release-all] Error 2
    make[2]: Leaving directory `C:/Download/socketio/qwebsockets/src/websockets’
    make[1]: *** [sub-websockets-make_first-ordered] Error 2
    make[1]: Leaving directory `C:/Download/socketio/qwebsockets/src’
    make: *** [sub-src-make_first] Error 2

  4. I also noticed that socketioclient.h has the following, but this is unrelated to the above error.

    #ifndef WEBSOCKETCLIENT_H
    #define WEBSOCKETCLIENT_H
    . . .
    #endif // WEBSOCKETCLIENT_H

    • The socket.io client still needs polishing. I’ll do this as soon as QtWebSockets is completed (a.o. support for secure websockets and complete unit tests).

  5. I was using a msvc++ version of qmake and not the win32-g++ version. When I used the win32-g++ qmake, then make, I had the following error.

    cd src/ && ( test -e Makefile || C:/Download/socketio/qwebsockets/qmake.exe C:/Download/socketio/qwebsockets/src/src.pro -o Makefile ) && make -f Makefile
    make[1]: Entering directory `C:/Download/socketio/qwebsockets/src’
    cd websockets/ && ( test -e Makefile || C:/Download/socketio/qwebsockets/qmake.exe C:/Download/socketio/qwebsockets/src/websockets/websockets.pro -o Makefile ) && make -f Makefile
    make[2]: Entering directory `C:/Download/socketio/qwebsockets/src/websockets’
    make -f Makefile.Release all
    make[3]: Entering directory `C:/Download/socketio/qwebsockets/src/websockets’
    g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -Wall -Wextra -DUNICODE -DQTWEBSOCKETS_LIBRARY -DQT_BUILD_WEBSOCKETS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I’../../include’ -I’../../include/QtWebSockets’ -I’C:/Download/socketio/qwebsockets/include/QtWebSockets/5.1.1′ -I’C:/Download/socketio/qwebsockets/include/QtWebSockets/5.1.1/QtWebSockets’ -I’tmp’ -I’C:/Qt/5.1.1/mingw48_32/include’ -I’C:/Qt/5.1.1/mingw48_32/include/QtNetwork’ -I’C:/Qt/5.1.1/mingw48_32/include/QtGui’ -I’C:/Qt/5.1.1/mingw48_32/include/QtCore’ -I’.moc/release_shared’ -I’C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++’ -o .obj/release_shared/qwebsocket.o qwebsocket.cpp
    process_begin: CreateProcess(NULL, g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -Wall -Wextra -DUNICODE -DQTWEBSOCKETS_LIBRARY -DQT_BUILD_WEBSOCKETS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtWebSockets
    -IC:/Download/socketio/qwebsockets/include/QtWebSockets/5.1.1 -IC:/Download/socketio/qwebsockets/include/QtWebSockets/5.1.1/QtWebSockets -Itmp -IC:/Qt/5.1.1/mingw48_32/include -IC:/Qt/5.1.1/mingw48_32/include/QtNetwork -IC:/Qt/5.1.1/mingw48_32/include/QtGui -IC:/Qt/5.1.1/mingw48_32/include/QtCore -I.moc/release_shared -IC:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++ -o .obj/release_shared/qwebsocket.o qwebsocket.cpp, …) failed.
    make (e=2): The system cannot find the file specified.
    make[3]: *** [.obj/release_shared/qwebsocket.o] Error 2
    make[3]: Leaving directory `C:/Download/socketio/qwebsockets/src/websockets’
    make[2]: *** [release-all] Error 2
    make[2]: Leaving directory `C:/Download/socketio/qwebsockets/src/websockets’
    make[1]: *** [sub-websockets-make_first-ordered] Error 2
    make[1]: Leaving directory `C:/Download/socketio/qwebsockets/src’
    make: *** [sub-src-make_first] Error 2

  6. After repeated attempts over the last 2 weeks I am still getting errors. I tried using the command line and Qt Creator with numerous “starting” points, such as websockets.pro, src.pro, qt_websockets.pri, etc. When I open the QwebSockets module in Qt Creator (via websockets.pro) and compile it. I get the following errors on windows 8. Can you help???
    @
    . . .
    Project file(websocketcorsauthenticator.pro) not recursed because all requirements not met:
    contains(QT_CONFIG, private_tests)
    15:12:34: The process “C:\Qt5.2b1\5.2.0-beta1\mingw48_32\bin\qmake.exe” exited normally.
    15:12:34: Starting: “C:\Qt5.2b1\Tools\mingw48_32\bin\mingw32-make.exe”
    makefile:40: recipe for target ‘sub-src-make_first’ failed
    mingw32-make: *** [sub-src-make_first] Error -1073741515
    15:12:35: The process “C:\Qt5.2b1\Tools\mingw48_32\bin\mingw32-make.exe” exited with code 2.
    Error while building/deploying project websockets (kit: Clone of Desktop Qt 5.2.0 MinGW 32bit)
    When executing step ‘Make’
    @

  7. Kurt,
    I still can’t get QWebSockets to compile and build a module, but I am able to do some limited development. I’ve encountered several different errors in the socketioclient.h (lines 1/2/74, 8, 47, 60, etc.) and socketioclient.cpp (lines 2, 27, 83, 93, 339, 356, etc.) files so far and I’m beginning to find some errors in qwebsocket.h (lines 43, 110, etc.). I’m stopping for now until I hear from you. QWebSockets and QSocketIo have a lot of potential but they still need a LOT of work.

  8. Hi Steve,

    the QtWebSockets module has been integrated into the Qt Continuous Integration system. You can follow the build status here: http://testresults.qt-project.org/ci/status/.
    I thought this was the best way to check compilation on all major platforms supported by Qt. The only thing I can tell is that it builds successfully on all the platforms. Regarding errors during runtime, you can be assured: QtWebSockets is already successfully used in at least 6 projects I know of, including 2 at my company (+/- 1000 clients). QtWebSockets has also been intensively tested against AutoBahn.
    The correct way to build QtWebSockets is as follows:
    git clone git://gitorious.org/qtplayground/websockets.git
    then cd into the websockets directory
    Run:
    qmake -recursive
    make
    make install

    The last step will make the QtWebSockets module available as a Qt module. To use it, include QT += websockets into your .pro file.
    Note: make sure you run qmake from the correct directory. I see you use Qt 5.2.0, then use /qtbase/bin/qmake.

    • I have Qt 5.1.1 and several Qt 5.2 beta 1 installations. All have qmakes in their compiler bin directories but NONE have a qmake in a qtbase bin directory.

      • I used the qmake from the mingw_32 bin directory and entered “qmake -recursive” but get the following.

        Reading C:/Projects/Gamr/Misc/websockets/src/src.pro
        Reading C:/Projects/Gamr/Misc/websockets/src/websockets/websockets.pro
        Project MESSAGE: perl -w C:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/bin/syncqt.pl -module QtWebSockets -version 5.2.0 -outdir C:/Projects/Gamr/Misc/websockets C:/Projects/Gamr/Misc/websockets
        = c:/Projects/Gamr/Misc/websockets
        = c:/Projects/Gamr/Misc/websockets
        Reading C:/Projects/Gamr/Misc/websockets/src/imports/imports.pro
        Reading C:/Projects/Gamr/Misc/websockets/src/imports/qmlwebsockets/qmlwebsockets.pro
        Reading C:/Projects/Gamr/Misc/websockets/examples/examples.pro
        Reading C:/Projects/Gamr/Misc/websockets/examples/echoclient/echoclient.pro
        Reading C:/Projects/Gamr/Misc/websockets/examples/echoserver/echoserver.pro
        Reading C:/Projects/Gamr/Misc/websockets/examples/qmlwebsocketclient/qmlwebsocketclient.pro
        Reading C:/Projects/Gamr/Misc/websockets/tests/tests.pro
        Reading C:/Projects/Gamr/Misc/websockets/tests/auto/auto.pro
        Reading C:/Projects/Gamr/Misc/websockets/tests/auto/websocketcorsauthenticator/websocketcorsauthenticator.pro
        Project file(websocketcorsauthenticator.pro) not recursed because all requirements not met:
        contains(QT_CONFIG, private_tests)
        Reading C:/Projects/Gamr/Misc/websockets/tests/autobahn/autobahn.pro
        Reading C:/Projects/Gamr/Misc/websockets/tests/autobahn/compliance/compliance.pro
        Reading C:/Projects/Gamr/Misc/websockets/tests/autobahn/websockets/websockets.pro

        when I then do a “make” I get the following.

        cd src/ && ( test -e Makefile || C:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/bin/qmake C:/Projects/Gamr/Misc/websockets/src/src.pro -o Makefile ) && make -f Makefile
        make[1]: Entering directory `C:/Projects/Gamr/Misc/websockets/src’
        cd websockets/ && ( test -e Makefile || C:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/bin/qmake C:/Projects/Gamr/Misc/websockets/src/websockets/websockets.pro -o Makefile ) && make -f Makefile
        make[2]: Entering directory `C:/Projects/Gamr/Misc/websockets/src/websockets’
        make -f Makefile.Release all
        make[3]: Entering directory `C:/Projects/Gamr/Misc/websockets/src/websockets’
        g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -Wall -Wextra -DUNICODE -DQTWEBSOCKETS_LIBRARY -DQT_BUILD_WEBSOCKETS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I’../../include’ -I’../../include/QtWebSockets’ -I’../../include/QtWebSockets/
        5.2.0′ -I’../../include/QtWebSockets/5.2.0/QtWebSockets’ -I’tmp’ -I’C:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/include’ -I’C:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/include/QtNetwork’ -I’C:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/include/QtGui’ -I’C:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/include/QtCore’ -I’.moc/release_shared’ -I’C:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/mkspecs/win32-g++’ -o .obj/release_shared/qwebsocket.o qwebsocket.cpp
        process_begin: CreateProcess(NULL, g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -Wall -Wextra -DUNICODE -DQTWEBSOCKETS_LIBRARY -DQT_BUILD_WEBSOCKETS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../include -I../../include/QtWebSockets
        -I../../include/QtWebSockets/5.2.0 -I../../include/QtWebSockets/5.2.0/QtWebSockets -Itmp -IC:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/include -IC:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/include/QtNetwork -IC:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/include/QtGui -IC:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/include/QtCore -I.moc/release_shared -IC:/Qt5.2b1MinGW/5.2.0-beta1/mingw48_32/mkspecs/win32-g++ -o .obj/release_shared/qwebsocket.o qwebsocket.cpp, …) failed.
        make (e=2): The system cannot find the file specified.
        make[3]: *** [.obj/release_shared/qwebsocket.o] Error 2
        make[3]: Leaving directory `C:/Projects/Gamr/Misc/websockets/src/websockets’
        make[2]: *** [release-all] Error 2
        make[2]: Leaving directory `C:/Projects/Gamr/Misc/websockets/src/websockets’
        make[1]: *** [sub-websockets-make_first-ordered] Error 2
        make[1]: Leaving directory `C:/Projects/Gamr/Misc/websockets/src’
        make: *** [sub-src-make_first] Error 2

  9. Kurt,

    I’m using windows 8 and it looks like the only windows 8 continuous build is win64-msvc2012_developer-build_qtnamespace_Windows_8. It’s interesting that despite several errors in the “successful” log.txt, these lines appear at the end.

    Normally I would now fail. However, `forcesuccess’ was set in C:/work/build/_testconfig/projects/WebSockets_master_Integration/stages/win64-msvc2012_developer-build_qtnamespace_Windows_8/forcesuccess.
    Therefore I’m going to exit successfully.
    This probably indicates that this test is known to not yet be stable.
    Regular expression run condition: Expression=[^.*\bwindows\b.*$], Label=[ci-win8-x64-11 win64-msvc2012_developer-build_qtnamespace_Windows_8 windows winrt-x64-msvc2012_Windows_8]
    Run condition [Not] preventing perform for step [Execute shell]
    Finished: SUCCESS

    • Steve,

      I tried it on 2 machines:
      – Windows 7 32-bit with Qt5.1.1 and mingw-47
      – Windows 7 64-bit with Qt5.1.1 and mingw-48

      All builds and unit tests were fine. I have installed Windows8.1 in a virtual machine and will try to do the compilation on that. If you want I can provide you with binaries (and headers of course).

  10. Kurt,

    Please let me know the results of running with Windows 8.1. I’m currently using Qt 5.2 beta 1 (or 5.1.1), windows 8 64-bit and mingw-48 (or msvc2012_64 or …). Please provide binaries/headers and let me know the compilation configuration. Thanks.

    BTW, do you have an estimated time frame for when QSocketIo may be functional? I have a node.js server with socket.io and I’m anxious to test QSocketIo as soon as possible. Thanks again.

  11. Okay Steve,

    I compiled on Windows 8.1 64-bit, Qt 5.1.1 and MingW-48. It is important that you install Perl as well (I installed ActivePerl).
    First I installed a fresh copy of Qt5.1.1 with mingw48-32 (you need to put a check next to that in the installer). I installed Git and then I installed ActivePerl.
    Once installed, open a command prompt (I opened the Qt 5.1.1 command prompt; called Qt 5.1.1 for Desktop), and executed the following steps:
    git clone git://qt.gitorious.org/qtplayground/websockets
    cd websockets
    qmake -recursive
    \Tools\mingw48_32\bin\mingw32-make.exe
    \Tools\mingw48_32\bin\mingw32-make.exe install

    The last step installs QtWebSockets as a Qt module.

    QtSocketIo will be ready by Monday. But of course, you need QtWebSockets for that 🙂

    • Kurt,

      Thanks for your replies and all your hard work.

      I uninstalled anything related to Qt, deleted any directories, installed ActivePerl and reinstalled Qt 5.1.1. It looks like I successfully built the websocket (or qwebsocket or qtwebsocket or …) module. In the future, please be more specific when you provide instructions, such as specifying that ActivePerl (or an equivalent) is required, “qmake -recursive” and not just “qmake” is the first command (as in your Oct 19 reply), which qmake to use (e.g., I used qmake from 5.1.1\mingw48_32\bin), etc.

      Your Oct. 19 reply states “… Then in your project just include the qsocketio.pri file” (now called qt_socketio.pri?) and your Nov. 1 reply states “… To use it, include QT += websockets into your .pro file.” What files from QtWebSockets and QtSocketIo do I need to copy into my project directory, where do they need to be located and what modifications/additions are required in which .pro files for this to work?

      In addition to this, do you have any example code that shows a simple application of QtSocketIo? An example “calling” QtSocketIo from QML would be especially interesting.

  12. Kurt,

    I know you’re busy but how about a little feedback? It’s been 10 days since my last post and I see you’ve been active in several of the Qt groups. Thanks

    • Hi Steve, I’ve been quite busy yes (Qt 5.2 is nearing its release). In the meantime, a QML WebSockets component has been created. I also tested QtSocketIo with the latest implementation of QtWebSockets, and I will post an example this weekend. I have working code from a real-world project that is using node.js. Is a node.js sample OK with you? In that case, I will isolate the relevant portions from the software and put it on GitHub.
      Cheers,

      Kurt

  13. Will the QtSocketIo code be callable from QML, C++ and/or JavaScript? Please be sure that you specify how to build and deploy/run the sample, including the compiler used, the version of Qt, the operating system, etc. Thanks.

  14. Kurt,

    On November 23 you posted “…I will post an example this weekend…” There’s still no example and QtSocketIo was last updated on github 20 days ago. Any idea when there will be updated code with an example?

    Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s