Skip to content

Web Socket for Qt5 v1.1.0

Choose a tag to compare

@cculianu cculianu released this 25 Jul 16:23
· 11 commits to master since this release
06c4ac9

A lightweight RFC 6455 (Web Socket) implementation for Qt5 by Calin Culianu calin.culianu@gmail.com

Key highlights

  • Supports both ws:// and wss:// Web Sockets.
  • Support both client-side and server-side mode of operation.
  • Easy to integrate: just copy WebSocket.h and WebSocket.cpp into your project
  • Easy to use with existing codebases:
    • Unlike the QWebSocket module from Qt, this code's main class, WebSocket::Wrapper inherits from QTcpSocket and thus can easily be integrated into existing code.
    • In other words, the key paradigm offered is basically a generic wrapper for a regular QTcpSocket that itself inherits from QTcpSocket.
  • Asynchronous mode of operation (requires an event loop in the thread the WebSocket::Wrapper lives in).
  • Requires C++17.

How to use in your project

  1. Copy WebSocket.h and WebSocket.cpp into your project.
  2. Enjoy! (The license here is MIT so you can use this in any project, commercial or open source).

What's new in v1.1.0

  • Fixed an issue where wss:// sockets were not working with some browsers. Thanks to @EchterAgo for this fix. Includes back-ports from the Fulcrum codebase (which uses this lib):
  • Fixed "deprecation warnings" when compiling against Qt 5.15.x.