INTERFACE IPortSelector

Interface for port selection strategy

Public Methods

SelectAvailablePort

 int SelectAvailablePort(string baseUrl, int initialPort, int maxTries)

Selects an available port, trying alternative ports if needed

Parameters:

  • baseUrl (string): Base URL to bind
  • initialPort (int): Initially requested port
  • maxTries (int): Maximum number of port selection attempts

Returns: int

  • An available port number