EWOULDBLOCK 对 sendto() 有用吗?
有人可以告诉我们是否 EWOULDBLOCK。 sendto() 有效吗? 如果是!请举个例子...谢谢! 如果没有的话,有没有类似接受错误的东西?
感谢您的回复
Could someone please tell us if EWOULDBLOCK. works sendto()?
If yes! please give an example ... thanks!
If not, is there anything similar to accept error?
Thanks for your replies
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前还不完全清楚你在问什么。 Google 搜索 sendto 和 EWOULDBLOCK 意味着它可以被返回,是的。理论上,套接字上的任何发送操作都可能耗尽发送缓冲区空间,这意味着操作系统必须等待,直到此类空间可用,因此 EWOULDBLOCK 是为非阻塞套接字返回的合理值。
It's not entirely clear what you're asking. A Google search for sendto and EWOULDBLOCK would imply that it can be returned, yes. Any sending operation on a socket could theoretically run out of send-buffer space, which means the operating system would have to wait until such space became available, hence EWOULDBLOCK is a reasonable value to return for a non-blocking socket.