client sends multiple roundtrips

This commit is contained in:
sm
2018-01-24 21:25:26 -08:00
parent 70288014ea
commit f61632af7f
+4 -2
View File
@@ -20,10 +20,12 @@ func main() {
c := pb.NewHelloWorldProtobufClient(fmt.Sprintf("http://%s", os.Args[1]), &http.Client{})
for i := 0; ; i++ {
resp, err := c.Hello(context.Background(), &pb.HelloReq{Subject: strings.Join(os.Args[2:], " ")})
if err != nil {
fmt.Fprintf(os.Stderr, "hello: %v\n", err)
fmt.Fprintf(os.Stderr, "hello: %#v\n", err)
os.Exit(1)
}
fmt.Printf("%v\n", resp)
fmt.Printf("0x%08x: %#v\n", i, resp)
}
}