Save This Page
Home » apache-harmony-6.0-src-r917296-snapshot » java » net » [javadoc | source]
java.net
class: SocksSocketImpl [javadoc | source]
java.lang.Object
   java.net.SocketImpl
      java.net.AbstractPlainSocketImpl
         java.net.PlainSocketImpl
            java.net.SocksSocketImpl

All Implemented Interfaces:
    SocksConsts, SocketOptions

SOCKS (V4 & V5) TCP socket implementation (RFC 1928). This is a subclass of PlainSocketImpl. Note this class should NOT be public.
Fields inherited from java.net.AbstractPlainSocketImpl:
timeout,  fdUseCount,  fdLock,  closePending,  SHUT_RD,  SHUT_WR
Fields inherited from java.net.SocketImpl:
address,  port,  fd,  localport,  netImpl,  receiveTimeout,  streaming,  shutdownInput
Constructor:
 SocksSocketImpl() 
 SocksSocketImpl(Proxy proxy) 
 SocksSocketImpl(String server,
    int port) 
Method from java.net.SocksSocketImpl Summary:
acceptFrom,   close,   connect,   getInetAddress,   getLocalPort,   getPort,   setV4,   socksBind
Methods from java.net.PlainSocketImpl:
accept,   acquireFD,   bind,   close,   connect,   connect,   connect,   create,   doConnect,   getFileDescriptor,   getInetAddress,   getInputStream,   getLocalPort,   getOption,   getOutputStream,   getPort,   getServerSocket,   getSocket,   getTimeout,   isClosedOrPending,   isConnectionReset,   isConnectionResetPending,   releaseFD,   reset,   sendUrgentData,   setAddress,   setConnectionReset,   setConnectionResetPending,   setFileDescriptor,   setInputStream,   setLocalPort,   setOption,   setPort,   setServerSocket,   setSocket,   shutdownInput,   shutdownOutput,   socketAccept,   socketAvailable,   socketBind,   socketClose0,   socketConnect,   socketCreate,   socketGetOption,   socketGetOption1,   socketListen,   socketSendUrgentData,   socketSetOption,   socketShutdown,   toString
Methods from java.net.AbstractPlainSocketImpl:
accept,   acquireFD,   available,   bind,   close,   connect,   connect,   connect,   create,   doConnect,   finalize,   getInputStream,   getOption,   getOutputStream,   getTimeout,   isClosedOrPending,   isConnectionReset,   isConnectionResetPending,   listen,   releaseFD,   reset,   sendUrgentData,   setAddress,   setConnectionReset,   setConnectionResetPending,   setFileDescriptor,   setInputStream,   setLocalPort,   setOption,   setPort,   shutdownInput,   shutdownOutput,   socketAccept,   socketAvailable,   socketBind,   socketClose,   socketClose0,   socketConnect,   socketCreate,   socketGetOption,   socketGetOption1,   socketListen,   socketSendUrgentData,   socketSetOption,   socketShutdown,   supportsUrgentData
Methods from java.net.SocketImpl:
accept,   available,   bind,   close,   connect,   connect,   connect,   create,   getFileDescriptor,   getInetAddress,   getInputStream,   getLocalPort,   getOption,   getOutputStream,   getPort,   listen,   sendUrgentData,   setOption,   setPerformancePreferences,   shutdownInput,   shutdownOutput,   supportsUrgentData,   toString,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.net.SocksSocketImpl Detail:
 protected  void acceptFrom(SocketImpl s,
    InetSocketAddress saddr) throws IOException 
    Accepts a connection from a specific host.
 protected  void close() throws IOException 
 protected  void connect(SocketAddress endpoint,
    int timeout) throws IOException 
    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.
 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() 
 protected synchronized  void socksBind(InetSocketAddress saddr) throws IOException 
    Sends the Bind request to the SOCKS proxy. In the SOCKS protocol, bind means "accept incoming connection from", so the SocketAddress is the the one of the host we do accept connection from.