Forum Discussion
Something to also take into account is the testing time. A lot of things can go wrong in a TCP connection and a lot of tests need to be done to be sure your TCP stack will behave correctly in all cases. I think it is one of the reasons why the commercial TCP stacks are so expensive (and I would be very careful if I bought a miraculously cheap TCP stack!). You need a lot of test cases with some lost packets (including those responsible for acknowledges or window size changes), different states in the sender and the receiver (socket still open on one side but not the other, or if one of the sides crashes), timeouts, too many open sockets... if your system will be connected to an open network, you may also have to test its robustness against malformed packets, or even DOS attacks.