public class SocketChannelUtil extends Object
Constructor and Description |
---|
SocketChannelUtil() |
Modifier and Type | Method and Description |
---|---|
static SocketChannel |
getConnectedSocketChannel(InetAddress host,
int port,
int timeout)
This will attempt to connect to the passed host and port.
|
public static SocketChannel getConnectedSocketChannel(InetAddress host, int port, int timeout) throws IOException, InterruptedException
host
- remote hostport
- porttimeout
- timeout (ms)IOException
- if any.InterruptedException
- if any.Copyright © 2015. All rights reserved.