Due: week 8
The goal of this lab is to use C# TPL futures and continuations in a more complex scenario, in conjunction with waiting for external events.
Write a program that is capable of simultaneously downloading several files through HTTP. Use directly the BeginConnect()/EndConnect(), BeginSend()/EndSend() and BeginReceive()/EndReceive() Socket functions, and write a simple parser for the HTTP protocol (it should be able only to get the header lines and to understand the Content-lenght: header line).
Try three implementations:
Note: do not use Wait() calls, except in Main() to wait for all tasks to complete after setting everything up.
A client for the above servers: srv-client.cs
Radu-Lucian LUPŞA