套接字:send()函数返回“断管”错误 [英] Socket: send() function returned 'Broken Pipe' error

查看:307
本文介绍了套接字:send()函数返回“断管”错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是套接字编程的新手,我正在尝试使用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?


  1. 何时 send(),能否请您帮我以下几点?函数返回管道破损错误?

  2. 套接字编程中管道破损错误的原因是什么?

  3. 解决方案是什么

  1. When the send() function returns the "Broken pipe" errors?
  2. What are the causes for "Broken pipe" errors in socket programming?
  3. 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.

推荐答案



  1. send()返回断管错误

  1. When send() returns the "Broken pipe" errors


当您写入已被对等方关闭的连接时。

When you have written to a connection that has already been closed by the peer.



  1. 套接字编程中管道破损错误的原因是什么


写给已被对等方关闭的连接。

Writing to a connection that has already been closed by the peer.



  1. 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屋!

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