套接字:send()函数返回“断管”错误 [英] Socket: send() function returned 'Broken Pipe' error
问题描述
我是套接字编程的新手,我正在尝试使用C ++中的 send()
函数将一些数据包发送到服务器,但我总是遇到管道破损的情况发送数据包到服务器时出错。
I am new to socket programming, I am trying to send some packets to server using the send()
function in C++, but I am always getting a 'Broken pipe' error while sending packets to the server. Could you please help me for the below points?
- 何时
send()
,能否请您帮我以下几点?函数返回管道破损错误? - 套接字编程中管道破损错误的原因是什么?
- 解决方案是什么
- When the
send()
function returns the "Broken pipe" errors? - What are the causes for "Broken pipe" errors in socket programming?
- What will be the solution for "Broken pipe" error from the
send()
function?
提示 send()
函数出现断管错误? :我正在使用命名套接字在客户端和服务器之间进行通信。
Note: I am using named socket to communicate between client and server.
推荐答案
- 当
send()
返回断管错误
- When
send()
returns the "Broken pipe" errors
当您写入已被对等方关闭的连接时。
When you have written to a connection that has already been closed by the peer.
- 套接字编程中管道破损错误的原因是什么
写给已被对等方关闭的连接。
Writing to a connection that has already been closed by the peer.
- send()函数中管道断开错误的解决方案。
请勿写入已被对等方关闭的连接。
Don't write to a connection that has already been closed by the peer.
通常表明您已犯了先前的应用程序协议错误,因此对等方不了解你就放弃了。
It usually indicates that you have committed a prior application protocol error, so the peer didn't understand you and gave up.
这篇关于套接字:send()函数返回“断管”错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!