KO
|
EN
gitlite โ search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
go-iperf
โ 24
Open GitHub โ
A Go based wrapper around iperf3
Download README (.md)
Explore Similar Repositories
lambda-circuit-breaker
:
No description available.
Candroid
:
๐ค๏ธ๐ง๏ธ๐ฆ๏ธ Candroid is the ultimate Android BusyBox, and a complete open-source re-implementation of everything Android. Currently only available on Linux.
MojangAPI
:
MojangAPI
deepspeech2-pytorch-adversarial-attack
:
Adversarial attack against DeepSpeech2 ASR pytorch model
RestaurantAPI
:
No description available.
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
go-iperf
?
Download (.md)
# go-iperf A Go based wrapper around iperf3 ## Basic Usage basic client setup ```go func main() { c := iperf.NewClient("192.168.0.10") c.SetJSON(true) c.SetIncludeServer(true) c.SetStreams(4) c.SetTimeSec(30) c.SetInterval(1) err := c.Start() if err != nil { fmt.Printf("failed to start client: %v\n", err) os.Exit(-1) } <- c.Done fmt.Println(c.Report().String()) } ``` basic server setup ```go func main() { s := iperf.NewServer() err := s.Start() if err != nil { fmt.Printf("failed to start server: %v\n", err) os.Exit(-1) } for s.Running { time.Sleep(100 * time.Millisecond) } fmt.Println("server finished") } ``` client with live results printing ```go func main() { c := iperf.NewClient("192.168.0.10") c.SetJSON(true) c.SetIncludeServer(true) c.SetStreams(4) c.SetTimeSec(30) c.SetInterval(1) liveReports := c.SetModeLive() go func() { for report := range liveReports { fmt.Println(report.String()) } } err := c.Start() if err != nil { fmt.Printf("failed to start client: %v\n", err) os.Exit(-1) } <- c.Done fmt.Println(c.Report().String()) } ``` building binary data package with iperf binaries ``` go-bindata -pkg iperf -prefix "embedded/" embedded/ ```