我是套接字编程的新手,我正在尝试使用 C++ 中的 send()
函数将一些数据包发送到服务器,但是在将数据包发送到服务器。你能帮我解决以下几点吗?
- 当
send()
函数返回“Broken pipe”错误时? - 套接字编程中出现“Broken pipe”错误的原因是什么?
send()
函数出现“Broken pipe”错误的解决方案是什么?
注意:我使用命名套接字在客户端和服务器之间进行通信。
最佳答案
- When
send()
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 send() function.
不要写入已被对等方关闭的连接。
这通常表示你之前犯了一个应用协议(protocol)错误,所以对方不理解你而放弃了。
关于c++ - 套接字 : send() function returned 'Broken Pipe' error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34448088/