initial implementation
This commit is contained in:
22
cmd/main.go
22
cmd/main.go
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user