I'm using System.Nets.Sockets.Socket to play the client side to connect our server. Everything works fine under Windows XP. But recently, our client report that the UI cannot alarm when it disconnect from the server side (by un-plug the network cable) under Windows 7. I've debug this situation, and found this case only happen in Windows7, but under Windows XP, it does work.
Then my question is, why this socket disconnect event hasn't been raised up under Wind开发者_StackOverflow社区ows 7 but XP do? Is there any way to fix this problem?
Thank you.
ehh, what event?
The only way to be sure that a socket is connected is by sending or receiving.
More info: http://nitoprograms.blogspot.com/2009/05/detection-of-half-open-dropped.html
精彩评论