summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/RelaySelector/RelaySelector.swift4
1 files changed, 4 insertions, 0 deletions
diff --git a/ios/RelaySelector/RelaySelector.swift b/ios/RelaySelector/RelaySelector.swift
index 6a22acef66..392aee7334 100644
--- a/ios/RelaySelector/RelaySelector.swift
+++ b/ios/RelaySelector/RelaySelector.swift
@@ -18,6 +18,10 @@ public enum RelaySelector {
return relays.bridge.shadowsocks.filter { $0.protocol == "tcp" }.randomElement()
}
+ /**
+ Filters relay list using given constraints and selects random relay.
+ Throws an error if there are no relays satisfying the given constraints.
+ */
public static func evaluate(
relays: REST.ServerRelaysResponse,
constraints: RelayConstraints