SpeedTestDelegate
public protocol SpeedTestDelegate : AnyObject
A protocol for receiving updates from a speed test.
-
Called when an error occurs during the speed test.
Declaration
Swift
func speedTestDidFail(with error: Error)Parameters
errorThe error that occurred.
-
Called periodically to report the current download speed and elapsed time.
Declaration
Swift
func speedTestDidChangeProgress(instantaneousMbps: Double, elapsedMs: TimeInterval)Parameters
instantaneousMbpsThe current download speed in megabits per second (Mbps).
elapsedMsThe elapsed time in milliseconds since the start of the test.
-
Called when the speed test is complete.
Declaration
Swift
func speedTestDidComplete(with result: SpeedTestResult)Parameters
resultThe result of the speed test, containing average speed and other metrics.