Swiftpack.co - Bouke/DNS as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Bouke.
Bouke/DNS 1.2.0
Swift implementation of DNS Records / RR
⭐️ 48
🕓 2 weeks ago
.package(url: "https://github.com/Bouke/DNS.git", from: "1.2.0")

DNS Record Types

A Swift implementation of DNS Record Types. Used for example in mDNS / NetService.

Build Status

Usage

// Encoding a message
let request = Message(
    type: .query,
    questions: [Question(name: "apple.com.", type: .pointer)]
)
let requestData = try request.serialize()

// Not shown here: send to DNS server over UDP, receive reply.

// Decoding a message
let responseData = Data()
let response = try Message.init(deserialize: responseData)
print(response.answers.first)

Credits

This library was written by Bouke Haarsma.

GitHub

link
Stars: 48
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

1 year ago

Added

  • Support for Swift 5

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics