Add .spi.yml
Send ICMP Ping requests in Swift! Powered by cpp-icmplib.
Add this to the dependencies array in Package.swift:
dependencies
Package.swift
.package(url: "https://github.com/LebJe/ICMPPing.git", from: "0.0.1")
Also add this to the targets array in the aforementioned file:
targets
.product(name: "ICMPPing", package: "ICMPPing")
Full documentation is available here.
import ICMPPing // Google IP Address let address = try ICMPPing.IPAddress("8.8.8.8", type: .ipv4) let result = ICMPPing.ping(address: address, timeout: 10 /* seconds */) print(result) // ICMPPing.Response( // address: 8.8.8.8, // code: 0, // timeToLive: 116, // interval: 23.011, // responseType: ICMPPing.Response.ResponseType.success // )
The cpp-icmplib license is available at https://github.com/markondej/cpp-icmplib/blob/c1e04b53923eec57efb898a4fdf94fea5b856c1d/LICENSE.
Before committing, please install pre-commit, swift-format, clang-format, and Prettier, then install the pre-commit hook:
$ brew bundle # install the packages specified in Brewfile $ pre-commit install # Commit your changes.
To install pre-commit on other platforms, refer to the documentation.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
ICMPPing
Send ICMP Ping requests in Swift! Powered by cpp-icmplib.
Installation
Swift Package Manager
Add this to the
dependencies
array inPackage.swift
:Also add this to the
targets
array in the aforementioned file:Full Documentation
Full documentation is available here.
Quick Start
Dependencies
Licenses
The cpp-icmplib license is available at https://github.com/markondej/cpp-icmplib/blob/c1e04b53923eec57efb898a4fdf94fea5b856c1d/LICENSE.
Contributing
Before committing, please install pre-commit, swift-format, clang-format, and Prettier, then install the pre-commit hook:
To install pre-commit on other platforms, refer to the documentation.