net.spy.net
Class TimedSocket

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

public abstract class TimedSocket
extends java.lang.Object

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


Method Summary
static java.net.Socket getSocket(java.net.InetAddress addr, int port, int delay)
          Connect to a given host and port for a bit.
static void main(java.lang.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 java.net.Socket getSocket(java.net.InetAddress addr,
                                        int port,
                                        int delay)
                                 throws IOTimeoutException,
                                        java.io.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
java.io.IOException - for other failures connecting

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 1995-2006 SPY Internetworking. All Rights Reserved.