## net.i2p.i2ptunnel.socks
Class SOCKS5Server

    java.lang.Object
      net.i2p.i2ptunnel.socks.SOCKSServer
          net.i2p.i2ptunnel.socks.SOCKS5Server

    public class SOCKS5Server

extends SOCKSServer

Field Summary

Fields inherited from class net.i2p.i2ptunnel.socks.SOCKSServer
`connHostName, connPort, destSocket, FIXME`

Constructor Summary
`SOCKS5Server(java.net.Socket clientSock)` Create a SOCKS5 server that communicates with the client using the specified socket.

Method Summary
`protected void` `confirmConnection()` Confirm to the client that the connection has succeeded
`java.net.Socket` `getClientSocket()` Get a socket that can be used to send/receive 8-bit clean data to/from the client.
`protected void` `setupServer()` Perform server initialization (expecially regarding protected variables).

Methods inherited from class net.i2p.i2ptunnel.socks.SOCKSServer
`getDestinationI2PSocket`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SOCKS5Server

    public SOCKS5Server(java.net.Socket clientSock)

  Create a SOCKS5 server that communicates with the client using the specified socket. This method should not be invoked directly: new SOCKS5Server objects should be created by using SOCKSServerFactory.createSOCSKServer(). It is assumed that the SOCKS VER field has been stripped from the input stream of the client socket.

  Parameters:
    `clientSock` - client socket

Method Detail

### getClientSocket

    public java.net.Socket getClientSocket()
                                    throws SOCKSException

  Description copied from class: `SOCKSServer`
  Get a socket that can be used to send/receive 8-bit clean data to/from the client.

  Specified by:
    `getClientSocket` in class `SOCKSServer`
  Returns:
    a Socket connected with the client
  Throws:
    `SOCKSException`

### setupServer

    protected void setupServer()
                        throws SOCKSException

  Description copied from class: `SOCKSServer`
  Perform server initialization (expecially regarding protected variables).

  Specified by:
    `setupServer` in class `SOCKSServer`
  Throws:
    `SOCKSException`

### confirmConnection

    protected void confirmConnection()
                              throws SOCKSException

  Description copied from class: `SOCKSServer`
  Confirm to the client that the connection has succeeded

  Specified by:
    `confirmConnection` in class `SOCKSServer`
  Throws:
    `SOCKSException`