| |
|
| java.lang.Object java.net.SocketImpl java.net.PlainSocketImpl java.net.SocksSocketImpl
SocksSocketImpl | class SocksSocketImpl extends PlainSocketImpl implements SocksConsts(Code) | | SOCKS (V4 & V5) TCP socket implementation (RFC 1928).
This is a subclass of PlainSocketImpl.
Note this class should NOT be public.
|
Method Summary | |
protected void | accept(SocketImpl s) Accepts a connection. | protected synchronized void | bind(InetAddress baddr, int lport) Binds this socket to the specified port number on the specified host. | protected void | close() | protected void | connect(SocketAddress endpoint, int timeout) Connects the Socks Socket to the specified endpoint. | protected InetAddress | getInetAddress() Returns the value of this socket's address field. | protected int | getLocalPort() | protected int | getPort() Returns the value of this socket's port field. | void | setV4() |
SocksSocketImpl | SocksSocketImpl(String server, int port)(Code) | | |
accept | protected void accept(SocketImpl s) throws IOException(Code) | | Accepts a connection.
Parameters: s - the accepted connection. exception: IOException - if an I/O error occurs when accepting theconnection. |
bind | protected synchronized void bind(InetAddress baddr, int lport) throws IOException(Code) | | Binds this socket to the specified port number on the specified host.
Parameters: baddr - the IP address of the remote host. Parameters: lport - the port number. exception: IOException - if an I/O error occurs when binding this socket. |
connect | protected void connect(SocketAddress endpoint, int timeout) throws IOException(Code) | | Connects the Socks Socket to the specified endpoint. It will first
connect to the SOCKS proxy and negotiate the access. If the proxy
grants the connections, then the connect is successful and all
further traffic will go to the "real" endpoint.
Parameters: endpoint - the SocketAddress to connect to. Parameters: timeout - the timeout value in milliseconds throws: IOException - if the connection can't be established. throws: SecurityException - if there is a security manager and itdoesn't allow the connection throws: IllegalArgumentException - if endpoint is null or aSocketAddress subclass not supported by this socket |
getLocalPort | protected int getLocalPort()(Code) | | |
getPort | protected int getPort()(Code) | | Returns the value of this socket's port field.
the value of this socket's port field. See Also: java.net.SocketImpl.port |
|
|
|