diff --git a/README.md b/README.md index 8ffaef7..85235d0 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,28 @@ ## Example +### Code +``` Swift +let baiduPinger = JAPing(hostName: "baidu.com", unexpertError: nil) +baiduPinger.configuare.pingCount = 8 +baiduPinger.start() +``` +### Result - See more in example +``` +PING baidu.com (220.181.57.216) +64 bytes from 220.181.57.216: icmp_seq=0 time=0.049 ms +64 bytes from 220.181.57.216: icmp_seq=1 time=0.05 ms +64 bytes from 220.181.57.216: icmp_seq=2 time=0.048 ms +64 bytes from 220.181.57.216: icmp_seq=3 time=0.048 ms +64 bytes from 220.181.57.216: icmp_seq=4 time=0.049 ms +64 bytes from 220.181.57.216: icmp_seq=5 time=0.055 ms +64 bytes from 220.181.57.216: icmp_seq=6 time=0.048 ms +64 bytes from 220.181.57.216: icmp_seq=7 time=0.055 ms +--- baidu.com ping statistics --- +8 packets transmitted, 8 packets received, 0% packet loss +round-trip min/avg/max/stddev = 0.048/0.05/0.055/0.003 ms +``` + To run the example project, clone the repo, and run `pod install` from the Example directory first. ## Requirements