public class ProxySocketFactory extends SocketFactory
Constructor and Description |
---|
ProxySocketFactory(Proxy proxy)
构造
|
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket() |
Socket |
createSocket(InetAddress address,
int port) |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddr,
int localPort) |
Socket |
createSocket(String host,
int port) |
Socket |
createSocket(String host,
int port,
InetAddress localAddr,
int localPort) |
static ProxySocketFactory |
of(Proxy proxy)
创建代理SocketFactory
|
getDefault
public ProxySocketFactory(Proxy proxy)
proxy
- Socket代理public static ProxySocketFactory of(Proxy proxy)
proxy
- 代理对象ProxySocketFactory
public Socket createSocket()
createSocket
in class SocketFactory
public Socket createSocket(InetAddress address, int port) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(String host, int port) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(String host, int port, InetAddress localAddr, int localPort) throws IOException
createSocket
in class SocketFactory
IOException
Copyright © 2024. All rights reserved.