public class SOCKS4Client extends Object
| Modifier and Type | Method and Description |
|---|---|
static void | connect(InputStream pin,
OutputStream pout,
String connHostName,
int connPort)Act as a SOCKS 4 client to connect to a proxy
Will throw and close pin and pout on all errors. |
static void | connect(Socket sock,
String connHostName,
int connPort)Act as a SOCKS 4 client to connect to a proxy
Will throw and close sock on all errors. |
public static void connect(InputStream pin, OutputStream pout, String connHostName, int connPort) throws IOException
pin - input stream from the proxypout - output stream to the proxyconnHostName - hostname for the proxy to connect toconnPort - port for the proxy to connect toIOException - if the connection fails or the proxy rejects the requestpublic static void connect(Socket sock, String connHostName, int connPort) throws IOException
sock - socket to the proxyconnHostName - hostname for the proxy to connect toconnPort - port for the proxy to connect toIOException