Reputation: 21
I've tried to detect connection close from peer application that is in the other computer but in same network.
I used Socket.Select()
and it worked to peer application in local peer but not to that is on remote host. (I used also Socket.Recv
and Socket.Poll
to get FIN)
Select randomly returns and sometimes doesn't return. (Poll too) What makes this difference?
Receiving other messages is Ok, so network is not a cause. Only FIN doesn't come!
Upvotes: 1
Views: 102
Reputation: 21
I got an answer guys!!!
Windows doesn't kill process right after we click x on window tab. We have to detect x button input and terminate process completely to ensure that process is dead.
You can see "undead" processes on your process manager~
Upvotes: 1