net.spy.net
Class TimedSocket
java.lang.Object
net.spy.net.TimedSocket
- public abstract class TimedSocket
- extends Object
Because java doesn't have the ability to timeout on a connection, this
does.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getSocket
public static Socket getSocket(InetAddress addr,
int port,
int delay)
throws IOTimeoutException,
IOException
- Connect to a given host and port for a bit.
- Parameters:
addr - Address of hostport - Port of servicedelay - Delay in milliseconds
- Throws:
IOTimeoutException - if there's a timeout connecting
IOException - for other failures connecting
main
public static void main(String[] args)
throws Exception
- Throws:
Exception