client sends multiple roundtrips
This commit is contained in:
parent
70288014ea
commit
f61632af7f
@ -20,10 +20,12 @@ func main() {
|
|||||||
|
|
||||||
c := pb.NewHelloWorldProtobufClient(fmt.Sprintf("http://%s", os.Args[1]), &http.Client{})
|
c := pb.NewHelloWorldProtobufClient(fmt.Sprintf("http://%s", os.Args[1]), &http.Client{})
|
||||||
|
|
||||||
resp, err := c.Hello(context.Background(), &pb.HelloReq{Subject: strings.Join(os.Args[2:], " ")})
|
for i := 0; ; i++ {
|
||||||
if err != nil {
|
resp, err := c.Hello(context.Background(), &pb.HelloReq{Subject: strings.Join(os.Args[2:], " ")})
|
||||||
fmt.Fprintf(os.Stderr, "hello: %v\n", err)
|
if err != nil {
|
||||||
os.Exit(1)
|
fmt.Fprintf(os.Stderr, "hello: %#v\n", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
fmt.Printf("0x%08x: %#v\n", i, resp)
|
||||||
}
|
}
|
||||||
fmt.Printf("%v\n", resp)
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user