Swiftpack.co - YOCKOW/SwiftNetworkGear as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by YOCKOW.
YOCKOW/SwiftNetworkGear 0.15.2
`SwiftNetworkGear` will provide various functions about network.
⭐️ 0
🕓 1 week ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/YOCKOW/SwiftNetworkGear.git", from: "0.15.2")

What is SwiftNetworkGear?

SwiftNetworkGear will provide various functions about network. It was originally written as a part of SwiftCGIResponder.

Requirements

  • Swift 5
  • macOS(>=10.15) or Linux

Dependencies

Dependencies

Usage

import NetworkGear
import Foundation

// DNS Lookup
Domain("GitHub.com")!.ipAddresses
//// -> [192.30.255.112, 192.30.255.113]

// DNS Reverse Lookup
IPAddress(string:"192.30.255.112")!.domain!
//// -> lb-192-30-255-112-sea.github.com

// Punycode
Domain("www.日本.jp")!.description
//// -> www.xn--wgv71a.jp


// Extended URL
URL(internationalString:"https://USER:[email protected]にっぽん。JP:8080/☕︎.cgi?杯=2#MyCoffee")!
//// -> https://USER:[email protected]:8080/%E2%98%95.cgi?%E6%9D%AF=2#MyCoffee

// Public Suffix
Domain("YOCKOW.jp")!.isPublicSuffix
//// -> false
Domain("YOCKOW.JP")!.publicSuffix!.description
//// -> jp

License

MIT License.
See "LICENSE.txt" for more information.

GitHub

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

Release Notes

Release 0.15.2
1 week ago

What's Changed

Full Changelog: https://github.com/YOCKOW/SwiftNetworkGear/compare/0.15.1...0.15.2

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