Lines Matching refs:arith
41 type Arith int
43 // Some of Arith's methods have value args, some have pointer args. That's deliberate.
45 func (t *Arith) Add(args Args, reply *Reply) error {
50 func (t *Arith) Mul(args *Args, reply *Reply) error {
55 func (t *Arith) Div(args Args, reply *Reply) error {
63 func (t *Arith) String(args *Args, reply *string) error {
68 func (t *Arith) Scan(args string, reply *Reply) (err error) {
73 func (t *Arith) Error(args *Args, reply *Reply) error {
97 Register(new(Arith))
99 RegisterName("net.rpc.Arith", new(Arith))
112 newServer.Register(new(Arith))
114 newServer.RegisterName("net.rpc.Arith", new(Arith))
115 newServer.RegisterName("newServer.Arith", new(Arith))
150 err = client.Call("Arith.Add", args, reply)
172 err = client.Call("Arith.BadOperation", args, reply)
183 err = client.Call("Arith.Unknown", args, reply)
193 mulCall := client.Go("Arith.Mul", args, mulReply, nil)
195 addCall := client.Go("Arith.Add", args, addReply, nil)
216 err = client.Call("Arith.Div", args, reply)
226 err = client.Call("Arith.Add", reply, reply) // args, reply would be the correct thing to use
228 t.Error("expected error calling Arith.Add with wrong arg type")
237 err = client.Call("Arith.Scan", &str, reply)
247 err = client.Call("Arith.String", args, &str)
258 err = client.Call("Arith.Mul", args, reply)
269 err = client.Call("net.rpc.Arith.Add", args, reply)
288 err = client.Call("newServer.Arith.Add", args, reply)
320 err = client.Call("Arith.Add", args, reply)
396 err := client.Call("Arith.Add", args, reply)
404 err = client.Call("Arith.Add", nil, reply)
406 t.Errorf("expected error calling Arith.Add with nil arg")
497 client.Call("Arith.Add", args, reply)
519 err := client.Call("Arith.Add", args, reply)
593 err = client.Call("Arith.Mul", args, &reply)
595 t.Fatal("arith error:", err)
597 t.Logf("Arith: %d*%d=%d\n", args.A, args.B, reply)
614 err = client.Call("Arith.Add", &Args{7, 9}, new(Reply))
623 newServer.Register(new(Arith))
624 newServer.RegisterName("net.rpc.Arith", new(Arith))
625 newServer.RegisterName("newServer.Arith", new(Arith))
648 err := client.Call("Arith.Add", args, reply)
687 client.Go("Arith.Add", args, reply, res)