Actually that timeout value won't work for what you are doing.
I tried using the code above...but I don't see anything happening when I provide a non-existent IP...that is when the timeout event happens...I would like to display a message to the user when the timeout happens...how can I use the Timeout property to do that?
Thanks.
Could you elaborate more on this? I actually have a valid IP to connect with, then unplug the connecting fiber. Will set timeout make an exception thrown?
(I tried to set 1, 2, 4 minutes. but only get a IOException after about 10 miuntes)
Maybe what you said is correct, but how to detect if fiber is unplugged, if setting timeout will not work?
Thanks !