【文件属性】:
文件名称:pinger:用于Go的ICMPUDP ping库
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-01 09:22:41
Go
平
用于Go的ICMP / UDP Ping库
例子
package main
import (
"github.com/arvinkulagin/pinger"
"log"
"os"
"fmt"
"time"
)
func main () {
if len ( os . Args ) < 2 {
fmt . Println ( "You must specify remote host address" )
os . Exit ( 1 )
}
raddr := os . Args [ 1 ]
p , err := pinger . NewPinger ( "udp" , "0.0.0.0" )
if err != nil {
log . Fatal ( err )
}
for {
time . Sleep ( 1 * time . Second )
【文件预览】:
pinger-master
----udping()
--------ping.go(540B)
----LICENSE(1KB)
----README.md(702B)
----pinger.go(4KB)
----.gitignore(276B)