Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. [Solved] WebSocket client
Forum Updated to NodeBB v4.3 + New Features

[Solved] WebSocket client

Scheduled Pinned Locked Moved 3rd Party Software
3 Posts 2 Posters 5.3k 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.
  • P Offline
    P Offline
    portoist
    wrote on last edited by
    #1

    Hello everybody,
    I am developing application that need to communicate with remote server via websockets. I was looking for some websocket client implementations and I have found "QtWebSockets":https://github.com/ant-lafarge/QtWebsocket. I was trying to connect to localhost python server on port 8888, or to echo.websocket.org on port 80. But it doesn't seem to work, I am getting QAbstractSocket::ConnectionRefusedError and QAbstractSocket::RemoteHostClosedError. I know that localhost server is running ok - I have created simple html page with JavaScript and it works. Has anybody some experience with this? Is this client ment only for communication with QWsServer?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      portoist
      wrote on last edited by
      #2

      I found out what was wrong.
      Masking in QtWebsocket was commented out. My server was ignoring frames and closing connection since frames were not masked. Removed comments and it seem to work fine.

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

        Maybe this can be of interest to you. I have just open-sourced a WebSockets implementation (see "QWebSockets":https://github.com/KurtPattyn/QWebSockets).
        The only dependency is Qt.
        The implementation has been tested against the Autobahn test suite, and except for non-character Unicode code points, all tests pass. Performance is also great; e.g. it is faster than any available browser.

        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