Discovery Service
Service for discovery related functionality.
Constructors
DiscoveryService
Link copied to clipboard
Functions
discover Local Servers
Link copied to clipboard
fun discoverLocalServers(timeout: Int = LocalServerDiscovery.DISCOVERY_TIMEOUT, maxServers: Int = LocalServerDiscovery.DISCOVERY_MAX_SERVERS): Flow<ServerDiscoveryInfo>
Content copied to clipboard
Discover servers on the local network. Uses the discoveryBroadcastAddressesProvider to find local devices to query.
get Address Candidates
Link copied to clipboard
Parses the given input and tries to fix common mistakes. The returned candidates are in order of most secure followed by most likely to work.
get Recommended Servers
Link copied to clipboard
suspend fun getRecommendedServers(input: String, minimumScore: RecommendedServerInfoScore = RecommendedServerInfoScore.BAD): Flow<RecommendedServerInfo>
Content copied to clipboard
Utility function that calls getRecommendedServers with the output of getAddressCandidates.
suspend fun getRecommendedServers(servers: List<String>, minimumScore: RecommendedServerInfoScore = RecommendedServerInfoScore.BAD): Flow<RecommendedServerInfo>
Content copied to clipboard
Connects to the servers and returns a flow of scored servers in the same order as the input. Uses the RecommendedServerDiscovery rules to determine the recommendation.