user avatar
Make the websocket handshake statefull
Allan Sandfeld Jensen authored
The websocket handshake could not handle being split over multiple
TCP packets since it was entirely handled in on function. This patch
splits it into a socket state making it possible to process over
multiple incoming packaets.

Change-Id: I3c45892ee6f1bb67062d561e9fbd2d7296f1208e
Task-number: QTBUG-40878
Reviewed-by: default avatarJocelyn Turcotte <jocelyn.turcotte@digia.com>
06df2dac

Introduction

QtWebSockets is a pure Qt implementation of WebSockets - both client and server. It is implemented as a Qt add-on module, that can easily be embedded into existing Qt projects. It has no other dependencies than Qt.

Features

  • Client and server capable
  • Text and binary sockets
  • Frame-based and message-based signals
  • Strict Unicode checking
  • WSS and proxy support

Requirements

Qt 5.x

Build And Usage

Checkout the source code from gitorious Go into the source directory and execute:

qmake
make
make install

The last command will install QtWebSockets as a Qt module.

To use, add websockets to the QT variable.

QT += websockets

Compliance

QtWebSockets is compliant with RFC6455 and has been tested with the Autobahn Testsuite.

Missing Features

  • Extensions and sub-protocols

License

This code is licensed under LGPL v2.1.