Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cdzombak/CDZPinger
Easy-to-use ICMP Ping for iOS (and maybe OSX)
https://github.com/cdzombak/CDZPinger
Last synced: 7 days ago
JSON representation
Easy-to-use ICMP Ping for iOS (and maybe OSX)
- Host: GitHub
- URL: https://github.com/cdzombak/CDZPinger
- Owner: cdzombak
- License: mit
- Archived: true
- Created: 2013-03-12T16:03:39.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-09T21:22:54.000Z (over 10 years ago)
- Last Synced: 2024-11-13T11:02:46.249Z (30 days ago)
- Language: Objective-C
- Size: 164 KB
- Stars: 49
- Watchers: 7
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - CDZPinger - Easy-to-use ICMP Ping. (Networking / Video)
- awesome-ios-star - CDZPinger - Easy-to-use ICMP Ping. (Networking / Video)
README
# CDZPinger
Easy-to-use ICMP ping for iOS - just create a CDZPinger and you delegate gets a callback every second with the average ping time.
## Installation
Add the dependency to your `Podfile`:
```ruby
platform :ios
pod 'CDZPinger'
...
```Run `pod install` to install the dependencies.
## Usage
`#import "CDZPinger.h"` and:
```objc
CDZPinger *pinger = [[CDZPinger alloc] initWithHost:@"google.com"];
// keep a strong reference to pinger, maybe in a property somewherepinger.delegate = self;
// (assuming self is your CDZPingerDelegate)
```In your delegate:
```objc
#pragma mark CDZPingerDelegate- (void)pinger:(CDZPinger *)pinger didUpdateWithAverageSeconds:(NSTimeInterval)seconds
{
NSLog([NSString stringWithFormat:@"Received ping; average time %.f ms", seconds*1000]);
}
```## Requirements
`CDZPinger` requires iOS 5.x+. It might work on iOS 4, but I haven't tested it.
There's also some chance it'll work on OS X, but again, I haven't tested it there either.
## License
[MIT License](http://http://opensource.org/licenses/mit-license.php). See LICENSE for the full details.
## Developer
Chris Dzombak, with ICMP ping code from Apple sample code.
* [chris.dzombak.name](http://chris.dzombak.name/)
* [email protected]
* [t@cdzombak](https://twitter.com/cdzombak)
* [a@dzombak](https://alpha.app.net/dzombak)