Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 12-Dec-15 3:55am
v2
Comments
Suvendu Shekhar Giri 12-Dec-15 7:10am    
It would be nice if you can post the details to your original question rather than posting a new question.
Nikita!8 12-Dec-15 7:39am    
I mean there are already this type of questions on this as well as other forums and i am repeating same question.
CHill60 12-Dec-15 9:56am    
What solution given? Either update your original question or at least provide a link to it here. We need to see your code

1 solution

You can't. The determination isn't made until an attempt to send something to the server times out and fails.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900