Support #6440
openIs there way to implement HTTP Server Push Streaming with WT?
0%
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
Updated by Wim Dumon over 5 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.
Updated by Lewis Lan over 5 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.
Updated by Lewis Lan over 5 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.
Updated by Wim Dumon over 5 years ago
Hey Lewis,
Can you share some example code? We did write streaming resources with WResource...
Best regards,
Wim.
Updated by Adam Rowell over 4 years ago
- File example.tar.gz example.tar.gz added
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.