You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
352 B
Go
26 lines
352 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/BGrewell/go-iperf"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
s := iperf.NewServer()
|
|
c := iperf.NewClient()
|
|
fmt.Println(s.Id)
|
|
fmt.Println(c.Id)
|
|
|
|
err := s.Start()
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
}
|
|
for s.Running {
|
|
time.Sleep(1 * time.Second)
|
|
}
|
|
|
|
fmt.Printf("Server exit code: %d\n", *s.ExitCode)
|
|
iperf.Cleanup()
|
|
}
|