Project

General

Profile

Actions

Feature #5104

closed

Request from server to user

Added by Kris Duraj over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/15/2016
Due date:
% Done:

0%

Estimated time:

Description

Hi,

I would like ask you is it possible to update sth on client page when another user changed sth.

There is one way to sending by ajax periodical request to check but this is not so efficient.

BR

kolus

Actions #1

Updated by Wim Dumon over 8 years ago

  • Status changed from New to Closed

Hello Kolus,

This is certainly possible, through the use of Wt's server push mechanism. Read about it in the reference manual, where Wt::WApplication::enableUpdates() is documented. Wt will use long-polling requests or websockets to send the updates to the client.

Wrt examples, the simplechat example uses this feature to update all chat windows of users connected to a common chat box. There is a serverpush example in the features directory that has a less elaborate demonstration of this feature.

Wim.

Actions

Also available in: Atom PDF