com.go.trove.net
Class SocketConnector
java.lang.Object
|
+--com.go.trove.net.SocketConnector
- public class SocketConnector
- extends java.lang.Object
Allows client socket connections to be established with a timeout.
- Version:
- 2 , 00/12/05
- Author:
- Brian S O'Neill
|
Method Summary |
static java.net.Socket |
connect(java.net.InetAddress address,
int port,
long timeout)
|
static java.net.Socket |
connect(java.lang.String host,
int port,
long timeout)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
connect
public static java.net.Socket connect(java.lang.String host,
int port,
long timeout)
throws java.net.SocketException
- Parameters:
timeout - Max time to wait for new connection. If negative, wait
is infinite.- Returns:
- null if couldn't connect in time.
connect
public static java.net.Socket connect(java.net.InetAddress address,
int port,
long timeout)
throws java.net.SocketException
- Parameters:
timeout - Max time to wait for new connection. If negative, wait
is infinite.- Returns:
- null if couldn't connect in time.