如何注入“断管"错误? [英] How to inject a "Broken pipe" error?

查看:32
本文介绍了如何注入“断管"错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试使用 TCP 套接字的网络程序.为了验证错误修复,我需要在套接字层重现断管"错误,但我不知道如何.任何的想法?非常感谢.

I am running test for a network program which uses TCP sockets. To verify a bug fix, I need to reproduce a "Broken pipe" error at the socket layer, but I don't know how. Any idea? Thanks a lot.

推荐答案

'Broken pipe' 表示您已写入已被对等方关闭的连接.因此,让对等方关闭连接.

'Broken pipe' means that you have written to a connection that has already been closed by the peer. So, have the peer close the connection.

这篇关于如何注入“断管"错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆