Class
MobiledgeXiOSLibrary.PerformanceMetrics.NetTest
@available(iOS 13.0, *) public class NetTest
Class that allows developers to easily test latency of their various backend servers. This is used in the implementation of FindCloudlet Performance Mode.
Relationships
Member Of
MobiledgeXiOSLibrary.PerformanceMetrics
Namespace for collecting network performance. Contains NetTest and Site classes
Nested Types
MobiledgeXiOSLibrary.PerformanceMetrics.NetTest.TestType
TestType is either PING or CONNECT, where PING is ICMP Ping (not implemented) and CONNECT is is actually setting up a connection and then disconnecting immediately.
Initializers
init(sites:qos:)
public init(sites: [Site], qos: DispatchQoS)
Properties
sites
var sites: [Site]
tests
var tests: [AnyCancellable]
timeout
var timeout = 5.0
Methods
runTest(interval:)
public func runTest(interval: Int)
Run tests at interval (milliseconds) indefinitely until call to cancelTest
runTest(numSamples:)
public func runTest(numSamples: Int? = nil) -> Promise<[Site]>
Run NetTest for numSamples per site
returnSortedSites()
public func returnSortedSites() -> [Site]
Sorted list of Sites from best to worst
cancelTest()
public func cancelTest()
addSite(site:)
public func addSite(site: Site)
removeSite(site:)
public func removeSite(site: Site)
connectAndDisconnect(site:)
public func connectAndDisconnect(site: Site)
connectAndDisconnectSocket(site:)
public func connectAndDisconnectSocket(site: Site)
Allows bind to cellular interface