ICMPPing

0.0.1

Send ICMP Ping requests in Swift!
LebJe/ICMPPing

What's New

Initial Release

2022-10-24T01:47:48Z

Changelog

Added

  • Initial Release

ICMPPing

Send ICMP Ping requests in Swift! Powered by cpp-icmplib.

Swift 5.5 SPM Compatible Build and Test

Installation

Swift Package Manager

Add this to the dependencies array in 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:

.product(name: "ICMPPing", package: "ICMPPing")

Full Documentation

Full documentation is available here.

Quick Start

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
// )

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:

$ 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.

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

Last updated: Mon Mar 18 2024 15:17:54 GMT-0900 (Hawaii-Aleutian Daylight Time)