Skip to content

Commit

Permalink
Update me, add some demo code
Browse files Browse the repository at this point in the history
  • Loading branch information
JadianZheng committed Sep 3, 2018
1 parent 1675757 commit 5a5a8cd
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a5a8cd

Please sign in to comment.