My application pre-selects a large number of video frames using asynchronous HttpWebRequest Requests. So, if there are 100 frames, the prefetcher will request all 100 frames asynchronously, immediately and process when they return. that is, it makes 100 asynchronous calls at the same time. This may saturate the network but this is normal. I want to maximize network bandwidth.
However, while this prefetching is in progress, the user may want to view one of the frames. So, let's say they want to view frame 56. The problem is that frames 1 - 100 are already requested and are in the pipe, so the request for frame 56 can take a long time to get an answer.
Which would be nice if there is some way to redirect asynchronous requests after they are created. And push the userβs request to the front of the queue.
If I cannot do this, I assume that I will have to request packages in packages so that I can skip my user request between batches and avoid a timeout.
Any ideas on how to do this correctly would be greatly appreciated.
Jacko source share