服务器程序采用了Windows的完成端口技术。当远端客户端意外断开连接时,在原生Windows操作系统上,GetQueuedCompletionStatus函数会返回FALSE,此时通过GetLastError可以查询到表示远端连接断开的错误码。然而在deepin-wine 10.7版本中,该函数却会返回TRUE表示操作成功,导致程序无法检测到远端连接异常断开的情况。
当返回true的时候,看看GetQueuedCompletionStatus的第二个参数返回多少字节?
lpNumberOfBytesTransferred
看能否用这个参数来判断。看wine的源码 GetQueuedCompletionStatus 函数有处理失败情况。
Featured Collection
Popular Ranking
Popular Events
服务器程序采用了Windows的完成端口技术。当远端客户端意外断开连接时,在原生Windows操作系统上,GetQueuedCompletionStatus函数会返回FALSE,此时通过GetLastError可以查询到表示远端连接断开的错误码。然而在deepin-wine 10.7版本中,该函数却会返回TRUE表示操作成功,导致程序无法检测到远端连接异常断开的情况。