I have a very basic question: how can I test a Socket to determine whether or not it is open?
I know I receive an exception if the socket is unexpectedly closed. I also know I receive a known return code (e.g. null) if I read or write to a closed socket. But how do I ask a Socket whether or not it is open without having to read or write?