Apologize for repeating question.
I have already tried the solution given, doesn't work in my case.
For disconnection i have already handled socket exception , 0 bytes received for handling disconnection.
This works perfectly in case of server shutdown , lan disconnection.
But when internet disconnects, socket does not disconnects immediately.
After internet disconnection when i sent some data on socket, that time socket
get disconnected.
How do i immediately detect socket disconnection in case of internet disconnection.
I have tried Socket.Poll().This doesn't works.
My code is written in c# .net