为了账号安全,请及时绑定邮箱和手机立即绑定

请教一下,在mfc中,关于Accept函数的问题?

请教一下,在mfc中,关于Accept函数的问题?

BIG阳 2021-07-15 21:11:48
mfc 在主程序中使用cslisten.Accept(aa)正常,可以连接并传送消息,cslisten ,aa均为CSocket变量,而将cslisten.Accept(aa)放在线程中编译连接不报错,运行到这里时出现Debug Assertion Failed.
查看完整描述

1 回答

?
白猪掌柜的

TA贡献1893条经验 获得超10个赞

FD_CLOSE: Only valid on connection-oriented sockets (for example, SOCK_STREAM) When WSAAsyncSelect called, if socket connection has been closed. After remote system initiated graceful close, when no data currently available to receive (Be aware that, if data has been received and is waiting to be read when the remote system initiates a graceful close, the FD_CLOSE is not delivered until all pending data has been read). After local system initiates graceful close with shutdown and remote system has responded with "End of Data" notification (for example, TCP FIN), when no data currently available to receive. When remote system terminates connection (for example, sent TCP RST), and lParam will contain WSAECONNRESET error value. Note FD_CLOSE is not posted after closesocket is called.

查看完整回答
反对 回复 2021-07-18
  • 1 回答
  • 0 关注
  • 297 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信