net.spy.net
Class TimedSocket

java.lang.Object
  extended bynet.spy.net.TimedSocket

public abstract class TimedSocket
extends Object

Because java doesn't have the ability to timeout on a connection, this does.


Method Summary
static Socket getSocket(InetAddress addr, int port, int delay)
          Connect to a given host and port for a bit.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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 host
port - Port of service
delay - 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