Project

General

Profile

Actions

Feature #12461

closed

Add a WebSocket resource

Added by Matthias Van Ceulebroeck 8 months ago. Updated 13 days ago.

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

100%

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.

Actions #1

Updated by Matthias Van Ceulebroeck 13 days ago

  • Status changed from InProgress to Implemented @Emweb
  • % Done changed from 0 to 100
Actions #2

Updated by Matthias Van Ceulebroeck 13 days ago

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: Atom PDF