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.
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/BGrewell/go-iperf"
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
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")
|
|
}
|