We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
d := client.NewPeer2PeerDiscovery("tcp@"+*addr2, "") xclient := client.NewXClient("Arith", client.Failtry, client.RandomSelect, d, client.DefaultOption) defer xclient.Close() args := &example.Args{ A: 10, B: 20, } reply := &example.Reply{} call, err := xclient.Go(context.Background(), "Mul", args, reply, nil) if err != nil { log.Fatalf("failed to call: %v", err) } replyCall := <-call.Done if replyCall.Error != nil { log.Fatalf("failed to call: %v", replyCall.Error) } else { log.Printf("%d * %d = %d", args.A, args.B, reply.C) }
执行client.go 后一直阻塞了,但是用xclient.Call是没有问题的。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
执行client.go 后一直阻塞了,但是用xclient.Call是没有问题的。
The text was updated successfully, but these errors were encountered: