org.apache.hc.core5.testing

## Class SocksProxy

- java.lang.Object
- - org.apache.hc.core5.testing.SocksProxy

-     public class SocksProxy
      extends Object

  Cheap and nasty SOCKS protocol version 5 proxy, recommended for use in unit tests only so we can test our SOCKS client code.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SocksProxy()`
    `SocksProxy(int port)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `cleanupSocksProxyHandler(org.apache.hc.core5.testing.SocksProxy.SocksProxyHandler handler)`
    `SocketAddress` | `getProxyAddress()`
    `void` | `shutdown(TimeValue timeout)`
    `void` | `start()`
    `protected void` | `startSocksProxyHandler(Socket socket)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SocksProxy

          public SocksProxy()

    - #### SocksProxy

          public SocksProxy(int port)

  - ### Method Detail

    - #### start

          public void start()
                     throws IOException

      Throws:
        `IOException`

    - #### shutdown

          public void shutdown(TimeValue timeout)
                        throws InterruptedException

      Throws:
        `InterruptedException`

    - #### startSocksProxyHandler

          protected void startSocksProxyHandler(Socket socket)

    - #### cleanupSocksProxyHandler

          protected void cleanupSocksProxyHandler(org.apache.hc.core5.testing.SocksProxy.SocksProxyHandler handler)

    - #### getProxyAddress

          public SocketAddress getProxyAddress()

Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.