Project

General

Profile

Support #6440

Is there way to implement HTTP Server Push Streaming with WT?

Added by Lewis Lan over 4 years ago. Updated over 3 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/12/2018
Due date:
% Done:

0%

Estimated time:

Description

Dear Sir,

Now I need to integrate streaming server(video or audio) using HTTP Server Push.

Is there way to implement it with WT (version:3.3.X)?

The streaming process is like that below:

Client(Send Http request(ex:http://ip address/streaming))Server(I need to implement)>Push streaming to Client

Thanks for your help.


Files

example.tar.gz (1.45 KB) example.tar.gz Adam Rowell, 05/24/2019 01:34 PM
#1

Updated by Wim Dumon over 4 years ago

Hi,

WResource supports streaming. Using continuations (see https://webtoolkit.eu/wt/doc/reference/html/classWt_1_1WResource.html), you can send a piece, keep the connection open, and send the rest at a later point in time.

Wim.

#2

Updated by Lewis Lan over 4 years ago

Hi Wim,

It seems that using WResource does not meet my requirement.

I tried to use continuations.But it only works on the streaming source for fixed length.

But for the live streaming(from camera), it is always playing.

Thanks.

#3

Updated by Lewis Lan over 4 years ago

Lewis Lan wrote:

Hi Wim,

It seems that using WResource does not meet my requirement.

I tried to use continuations.But it only works on the streaming source for fixed length.

But for the live continuous streaming(maybe from camera), it is always playing.

Thanks.

#4

Updated by Wim Dumon over 4 years ago

Hey Lewis,

Can you share some example code? We did write streaming resources with WResource...

Best regards,

Wim.

#5

Updated by Roel Standaert over 4 years ago

  • Status changed from New to Feedback
#6

Updated by Roel Standaert over 4 years ago

  • Target version deleted (3.3.11)
#7

Updated by Adam Rowell over 3 years ago

I think this example is related to Lewis's problem.

I've been trying to use WResource with ResponseContinuation, and I find that after the first continuation is handled, the request is aborted. What I'd like is to be able to call ResponseContinuation::waitForMoreData multiple times.

It looks like the root cause is that once a callback is registered with Connection::detectDisconnect, any traffic on the connection, including ACKs with 0 payload, close the connection as unexpected data.

Also available in: Atom PDF