code: public static ApiConnection connect(SocketFactory fact, String host, int port, int timeout) throws MikrotikApiException {
          return ApiConnectionImpl.connect(fact, host, port, timeout);
      }
docs: Create a new API connection to the give device on the supplied port using
  the supplied socket factory to create the socket.
  
  @param fact SocketFactory to use for TCP socket creation.
  @param host The host to which to connect.
  @param port The TCP port to use.
  @param timeout The connection timeout to use when opening the connection.
  @return The ApiConnection
  @throws me.legrange.mikrotik.MikrotikApiException Thrown if there is a
  problem connecting
  @since 3.0