com.enterprisedt.util.proxy
Class SocksProxySocket
java.lang.Object
java.net.Socket
com.enterprisedt.util.proxy.SocksProxySocket
- All Implemented Interfaces:
- StreamSocket
- Direct Known Subclasses:
- Socks4ProxySocket, Socks5ProxySocket
public abstract class SocksProxySocket
- extends java.net.Socket
- implements StreamSocket
- Version:
- $Revision: 1.4 $
- Author:
- $author$
| Methods inherited from class java.net.Socket |
bind, close, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.enterprisedt.util.proxy.StreamSocket |
close, getInetAddress, getInputStream, getLocalAddress, getLocalPort, getOutputStream, getReceiveBufferSize, getSendBufferSize, getSoTimeout, isConnected, setReceiveBufferSize, setSendBufferSize, setSoTimeout |
CONNECT
protected static final int CONNECT
- See Also:
- Constant Field Values
BIND
protected static final int BIND
- See Also:
- Constant Field Values
NULL_TERMINATION
protected static final int NULL_TERMINATION
- See Also:
- Constant Field Values
proxyIn
protected java.io.InputStream proxyIn
proxyOut
protected java.io.OutputStream proxyOut
providerDetail
protected java.lang.String providerDetail
proxyHost
protected java.lang.String proxyHost
proxyPort
protected int proxyPort
username
protected java.lang.String username
password
protected java.lang.String password
bindingAddress
protected java.lang.String bindingAddress
bindingPort
protected int bindingPort
remoteHostname
protected java.lang.String remoteHostname
SocksProxySocket
public SocksProxySocket()
getRemoteHost
public java.lang.String getRemoteHost()
- Get the actual hostname
- Specified by:
getRemoteHost in interface StreamSocket
- Returns:
- remote hostname
setRemoteHost
public void setRemoteHost(java.lang.String remoteHost)
- Set the remote hostname
- Specified by:
setRemoteHost in interface StreamSocket
- Parameters:
remoteHost - remote hostname
getProxyHost
public java.lang.String getProxyHost()
setProxyHost
public void setProxyHost(java.lang.String proxyHost)
getProxyPort
public int getProxyPort()
setProxyPort
public void setProxyPort(int proxyPort)
getBindingAddress
public java.lang.String getBindingAddress()
getBindingPort
public int getBindingPort()
getUsername
public java.lang.String getUsername()
setUsername
public void setUsername(java.lang.String username)
getPassword
public java.lang.String getPassword()
setPassword
public void setPassword(java.lang.String password)
getDetail
public java.lang.String getDetail()
- Description copied from interface:
StreamSocket
- Get details about the socket
- Specified by:
getDetail in interface StreamSocket
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString in class java.net.Socket
connect
public void connect(java.net.SocketAddress endpoint,
int timeout)
throws java.io.IOException
- Overrides:
connect in class java.net.Socket
- Throws:
java.io.IOException
bind
public void bind(java.lang.String remoteHost)
throws java.io.IOException
- Throws:
java.io.IOException
accept
public void accept()
throws java.io.IOException
- Throws:
java.io.IOException
sendRequest
protected abstract void sendRequest(int command,
java.lang.String remoteHost,
int remotePort)
throws java.io.IOException
- Throws:
java.io.IOException
readResponse
protected abstract void readResponse()
throws java.io.IOException
- Throws:
java.io.IOException
Copyright © 2001-2009 Enterprise Distributed Technologies Ltd. All Rights Reserved.