WSAGetLastError() 返回10054 ?

laZZe 2006-06-01 04:36:57
我用connect连接服务器成功,然后调用send给服务器发送数据,然后用recv接收服务器返回的数据,可是我用WSAGetLastError()却返回10054的错误,请问这是为什么?怎么解决?
...全文
567 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
DeadWolf 2006-06-01
  • 打赏
  • 举报
回复
你发送的东西可能有问题
revivalyan 2006-06-01
  • 打赏
  • 举报
回复
WSAECONNRESET
(10054)
Connection reset by peer.
An existing connection was forcibly closed by the remote host. This normally results if the peer application on the remote host is suddenly stopped, the host is rebooted, or the remote host uses a hard close (see setsockopt for more information on the SO_LINGER option on the remote socket.) This error may also result if a connection was broken due to keep-alive activity detecting a failure while one or more operations are in progress. Operations that were in progress fail with WSAENETRESET. Subsequent operations fail with WSAECONNRESET.

server斷了
laZZe 2006-06-01
  • 打赏
  • 举报
回复
晕倒,不是吧?我只发了几个字符串而已~~~
汗ing~~~
gao_ming77 2006-06-01
  • 打赏
  • 举报
回复
呵呵,可能你发送的数据导致server挂了,连接断了。

18,356

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧