swifter icon indicating copy to clipboard operation
swifter copied to clipboard

How to continually feed data back instead of returning the entire response

Open killmyrene opened this issue 7 years ago • 2 comments

Is there a way that the framework can feed data, bit by bit, back instead of returning the entire response at once?

I'm using this framework to speed up the AVPlayer's playback performance by splitting up each individual segment for multi-transfer byte range requests. This does speeds up performance but it messes up the ABR algorithm inside the AVPlayer and in turn start requesting for a higher variant, in which the network cannot download fast enough. As a result buffering stalls tends to happen a lot until it went down to using a lower variant

Hoping to use this approach to be aligned with the ABR algorithm

killmyrene avatar May 15 '18 17:05 killmyrene

Maybe this will help: https://github.com/httpswift/swifter/blob/73ac81070632bcf028680bad5db7b754dfd9ff9c/XCode/Sources/DemoServer.swift#L175-L181

damian-kolakowski avatar Oct 24 '18 04:10 damian-kolakowski

How to tell the HttpResponse that the end of stream?

snowinszu avatar Oct 07 '23 07:10 snowinszu