@hashgraph/solo
    Preparing search index...

    Utility class for port-related operations

    Index

    Constructors

    Methods

    • Find an available port starting from the given port

      Parameters

      • startPort: number

        Port number to start checking from

      • timeoutMs: number = 30_000

        Timeout in milliseconds before giving up (default: 30000)

      • logger: SoloLogger

        logger for debug messages

      Returns Promise<number>

      Promise that resolves to the first available port or throws an error if timeout is reached

      Error if no available port is found within the timeout period

    • Check if a TCP port is available on the local machine

      Parameters

      • port: number

        Port number to check

      Returns Promise<boolean>

      Promise that resolves to true if port is available, false otherwise