code: public HostPort setPassive(int port, int queue)
          throws IOException{
  
          if (serverSocket == null) {
              ServerSocketFactory factory =
                  ServerSocketFactory.getDefault();
              serverSocket = factory.createServerSocket(port, queue);
          }
  
          session.serverMode = Session.SERVER_PASSIVE;
  
          String address = Util.getLocalHostAddress();
          int localPort = serverSocket.getLocalPort();
  
          if (remoteControlChannel.isIPv6()) {
              String version = HostPort6.getIPAddressVersion(address);
              session.serverAddress =
                  new HostPort6(version, address, localPort);
          } else {
              session.serverAddress =
                  new HostPort(address, localPort);
          }
  
          logger.debug("started passive server at port " +
                       session.serverAddress.getPort());
          return session.serverAddress;
  
      }
docs: Start the local server
  @param port required server port; can be set to ANY_PORT
  @param queue max size of queue of awaiting new connection
  requests
  @return the server address