initial working version

This commit is contained in:
Ben Grewell
2021-03-09 10:27:46 -08:00
parent e8dc386ba0
commit 10cf19535e
16 changed files with 1586 additions and 214 deletions

View File

@@ -1,5 +1,23 @@
package main
import (
"fmt"
"github.com/BGrewell/go-iperf"
"os"
"time"
)
func main() {
$END$
s := iperf.NewServer()
err := s.Start()
if err != nil {
fmt.Println("failed to start server")
os.Exit(-1)
}
for s.Running {
time.Sleep(1 * time.Second)
}
fmt.Println("server has exited")
}