Java Sockets Taking too long to timeout
I have had this problem of sockets taking way too long to timeout when the specified ip address is invalid. Even setting the timeout appropriately and catching the errors I have still seen the execution of creating a socket take appox 10 times as long as it "should" have using the timeout being set to some abritray number.
Is there anyway to check and see if a certain IP has a specified port open, besides trying to connect to it by creating a socket and waiting for the very long timeout to occur.
I have tried using a loop of isReachable's and nesting in an attempt to connect to the certain port using a socket. I would like to know if there was a different way of implementing this. Also if the incredibly long wait that occurs from an invalid ip using a socket is normal.

