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
|
getDefaultpublic ProxySocketFactory(Proxy proxy)
proxy - Socket代理public static ProxySocketFactory of(Proxy proxy)
proxy - 代理对象ProxySocketFactorypublic Socket createSocket()
createSocket in class SocketFactorypublic Socket createSocket(InetAddress address, int port) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port, InetAddress localAddr, int localPort) throws IOException
createSocket in class SocketFactoryIOExceptionCopyright © 2025. All rights reserved.