diff options
Diffstat (limited to 'Hotline/Models/Hotline.swift')
| -rw-r--r-- | Hotline/Models/Hotline.swift | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift new file mode 100644 index 0000000..70f68a9 --- /dev/null +++ b/Hotline/Models/Hotline.swift @@ -0,0 +1,21 @@ +import SwiftUI + +@Observable final class Hotline { + let trackerClient: HotlineTrackerClient + + + + init(trackerClient: HotlineTrackerClient) { + self.trackerClient = trackerClient + } + + @MainActor func getServers(address: String, port: Int) async { + let fetchedServers = await withCheckedContinuation { [weak self] continuation in + self?.trackerClient.fetch() { + continuation.resume(returning: []) + } + } + + + } +} |