Triggering 'connection reset by peer'

2019-07-21 16:30发布

问题:

I would like to test the logging that happens in our app (an embedded ftp server) when a 'connection reset by peer' error occurs. This post explains the source of the error pretty well, but doesn't really explain how to cause one. Does anybody know a way to trigger this error for a TCP connection?

回答1:

tcpkill seems to do the job well.



标签: testing ftp tcp