jeudi 12 décembre 2019

How to test handling of TCP write timeout?

I have written an application that reads from and writes to a tcp socket.

Suppose the ethernet cable is unplugged after the application sends a message but before the TCP-level ACK response. An exception will thrown in my application.

How can I test the exception handling without physically unplugging the cable?

I'm using an application-level protocol that does not implement acknowledgments of its own.

I'm on windows but am open to solutions involving linux as well.

Aucun commentaire:

Enregistrer un commentaire