There's no trivial way to accomplish this. Network communications have very fast time-outs, far too fast for the best human to keep up with. So, the best one can hope for is an IP stack that has a vast number of user-configurable inputs, particularly in ways that may violate the TCP specs (useful for fault injection testing or stress testing, as well as black-hat packet injection).
Packages that claim to offer this sort of control: