Class Socks4Proxy.Socks4ProxyConnection

    • Constructor Detail

      • Socks4ProxyConnection

        public Socks4ProxyConnection​(EndPoint endPoint,
                                     java.util.concurrent.Executor executor,
                                     ClientConnectionFactory connectionFactory,
                                     java.util.Map<java.lang.String,​java.lang.Object> context)
    • Method Detail

      • onOpen

        public void onOpen()
        Description copied from interface: Connection

        Callback method invoked when this connection is opened.

        Creators of the connection implementation are responsible for calling this method.

        Specified by:
        onOpen in interface Connection
        Overrides:
        onOpen in class AbstractConnection
      • writeSocks4Connect

        private void writeSocks4Connect()
        Writes the SOCKS "connect" bytes, differentiating between SOCKS 4 and 4A; the former sends an IPv4 address, the latter the full domain name.
      • failed

        public void failed​(java.lang.Throwable x)
        Description copied from interface: Callback

        Callback invoked when the operation fails.

        Specified by:
        failed in interface Callback
        Parameters:
        x - the reason for the operation failure
      • onSocks4Response

        private void onSocks4Response​(int responseCode)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • tunnel

        private void tunnel()