C++发送返回 SOCKET_ERROR

发布于 2024-12-17 17:16:09 字数 169 浏览 2 评论 0原文

在我的 C++ 应用程序中,我使用网络连接 (TCP)。 当我发现网络连接错误时,我尝试连接到另一个接口。 在重新连接中,连接函数已顺利通过,但在发送函数上,它返回 SOCKET_ERROR 且 WSGetLastError 返回 10054。 你知道这个错误的含义是什么以及我应该做什么来解决它?

10倍

In my C++ application I'm using network connection (TCP).
when I'm identify a network connection error I'm trying to connect to another interface.
in the reconnection the connect function has passed with no error but on send function it return an SOCKET_ERROR and WSGetLastError return 10054.
do you know what is the meaning of this error and what should I do to resolve it?

10x

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅忆流年 2024-12-24 17:16:09

10054 表示 连接被对等方重置 - 远程端点回复一个 RST 数据包,告诉您连接未打开。使用 connect() 重新连接,而不是尝试简单地更改本地端的接口。

10054 means connection reset by peer -- the remote endpoint replied with an RST packet to tell you that the connection isn't open. Reconnect with connect() instead of trying to simply change interfaces on your local end.

半衾梦 2024-12-24 17:16:09

10054(连接由对等方重置)成功 connect() 意味着服务器接受传入连接,但之后它关闭接受的套接字而不等待传入信息。解决此问题的唯一方法是检查服务器应用程序逻辑。

10054 (connection reset by peer) after successfull connect() means that the server accepts incoming connection but after that it closes the accepted socket without waiting for incoming information. The only way to resolve this is to check the server application logic.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文