Modify your code from HW #7 (serve2.py) so that it is robust to GET requests being received in incomplete chunks. (Think: what if your ‘recv’ call doesn’t return the entire request?)
Test your code at the socket API level with a dependency injection approach. (You shouldn’t need to change your code-under-test at all to pass these tests.)
Implement either a threaded or a non-blocking approach (please flip a coin!) to multiprocessing – handling multiple connections at the same time. You can use code as in the echo-server stuff, OR (for threading) look at the ‘multiprocessing’ library. Up to you.
Put this implementation in ‘serve3.py’.
(How would you test this by hand? Hint: put ‘time.sleep(10)’ in various meep Web functions and see if other requests are processed concurrently.)