Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexander-ignition/swift-network-dns
Swift DNS
https://github.com/alexander-ignition/swift-network-dns
dns dns-client swift-async swift-concurrency
Last synced: about 5 hours ago
JSON representation
Swift DNS
- Host: GitHub
- URL: https://github.com/alexander-ignition/swift-network-dns
- Owner: Alexander-Ignition
- License: mit
- Created: 2024-02-17T17:27:38.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-02-17T18:22:33.000Z (9 months ago)
- Last Synced: 2024-02-18T18:45:19.955Z (9 months ago)
- Topics: dns, dns-client, swift-async, swift-concurrency
- Language: Swift
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# swift-network-dns
Swift DNS
```swift
import Foundation
import NetworkDNSlet queue = DispatchQueue(label: "swift-network-dns", qos: .utility)
let service = DNSService(host: "8.8.8.8", queue: queue)let response = try await service.send(.question(domain: "google.com", type: .a))
response.answers.forEach { record in
print("IPv4: \(record.ipv4 ?? "nil"), \(record.name)")
}
```