TCP proxy testing FAQ

This following is a list of the possible reasons why your proxy could not pass the tests. Hope it will be helpful to you.

Phase 1

Phase 1: (client write,server echo)checking the integrity of returned data
1 simultaneous connections (with read/write), 200 total...accept wait interrupted: Timer expired
Failed
This could be because your program does not handle client/server side' closing of the connection properly. Check what your program does when it reads EOF from client/server. Does it signal the other party of the EOF correctly?

Phase 3

Phase 3 tests whether your proxy handles non-responding client/server correctly (i.e. client/server who refuses to read data from the connection). If your program does not pass this test, try with the new phase3.c file. The difficulty in making the test is that, even though the client/server processs refuses to read data, the TCP stack in the operating system usually has some room of buffer (usually on the order of several K) to hold incoming packets which will still make the corresponding party's write attempt to make some progress. In the new phase3.c file, I've made the write requests bigger and lasts longer and therefore should fill this buffer quickly(hopefully) in the operating system causing further write attempt to halt completely. We'll test your program with this new phase3.c file.