code: @SuppressWarnings("unchecked")
      @Override
      protected ConnectFuture connect0(
              final SocketAddress remoteAddress,
              final SocketAddress localAddress,
              final IoSessionInitializer<? extends ConnectFuture> sessionInitializer) {
          if (!proxyIoSession.isReconnectionNeeded()) {
              // First connection
              IoHandler handler = getHandler();
              if (!(handler instanceof AbstractProxyIoHandler)) {
                  throw new IllegalArgumentException(
                          "IoHandler must be an instance of AbstractProxyIoHandler");
              }
  
              connector.setHandler(handler);
              future = new DefaultConnectFuture();
          }
  
          ConnectFuture conFuture = connector.connect(proxyIoSession
                  .getProxyAddress(), new ProxyIoSessionInitializer(
                  sessionInitializer, proxyIoSession));
  
          // If proxy does not use reconnection like socks the connector's 
          // future is returned. If we're in the middle of a reconnection
          // then we send back the connector's future which is only used
          // internally while <code>future</code> will be used to notify
          // the user of the connection state.
          if (proxyIoSession.getRequest() instanceof SocksProxyRequest
                  || proxyIoSession.isReconnectionNeeded()) {
              return conFuture;
          }
  
          return future;
      }
docs: Connects to the specified <code>address</code>.  If communication starts
  successfully, events are fired to the connector's <code>handler</code>.
  
  @param remoteAddress the remote address to connect to
  @param localAddress the local address
  @param sessionInitializer the session initializer
  @return {@link ConnectFuture} that will tell the result of the connection attempt