Project

General

Profile

Actions

Feature #12461

open

Add a WebSocket resource

Added by Matthias Van Ceulebroeck 2 months ago.

Status:
InProgress
Priority:
Normal
Target version:
Start date:
02/27/2024
Due date:
% Done:

0%

Estimated time:

Description

While Wt is able to communicate over the WebSocket protocol, defined in RFC6455. This same connection cannot be used to stream data.
Wt uses it to send updates over for its framework, essentially containing JavaScript snippets.

If a developer wishes to stream large amounts of data, they have few other choices than to use WResource. This performs HTTP requests to happen. However, were this to happen from the client side, this would require the developer to call doJavaScript, which can be triggered from the server using triggerUpdate. This grabs the application lock, which isn't ideal.

A better approach is to have a separate WWebSocketResource, which can stream data from a different thread. This would decrease the amount of effort a developer needs to undertake to have a stream between the client and server. Additionally, this ensures that there can be multiple streams opened, instead of just the one managed by Wt.

No data to display

Actions

Also available in: Atom PDF