Say I programmed an application that connects to a server using the Socket (TCP) class. If I encounter a SocketException while reading or writing, then obviously I need to go ahead and start the disconnect procedure to change the application state to “Disabled”.
But what if I started disconnecting, and while I clean up, a SocketException is raised?
SocketException doesn't really mean anything to me, since I was going to turn off the socket anyway ... is that normal to learn?
I really want to know what is the best practice for this situation.
source
share