initial implementation

This commit is contained in:
Ben Grewell
2020-12-15 13:13:56 -08:00
parent 03148c6413
commit a7116fd4a1
12 changed files with 358 additions and 41 deletions

View File

@@ -1,5 +1,25 @@
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()
}