Beispiel #1
0
func withServer(t *testing.T, f func(*server.Server)) {
	s := server.NewServer(serverName, address, port)
	go s.Start()
	time.Sleep(time.Millisecond * 3)
	f(s)

	time.Sleep(time.Millisecond * 3)
	s.Stop()
}
Beispiel #2
0
func main() {
	flag.Parse()
	s := server.NewServer(*name, *addr, *port)
	s.Start()
}