Lines Matching refs:arith
54 Here is a simple example. A server wishes to export an object of type Arith:
68 type Arith int
70 func (t *Arith) Multiply(args *Args, reply *int) error {
75 func (t *Arith) Divide(args *Args, quo *Quotient) error {
86 arith := new(Arith)
87 rpc.Register(arith)
95 At this point, clients can see a service "Arith" with methods "Arith.Multiply" and
96 "Arith.Divide". To invoke one, a client first dials the server:
108 err = client.Call("Arith.Multiply", args, &reply)
110 log.Fatal("arith error:", err)
112 fmt.Printf("Arith: %d*%d=%d", args.A, args.B, reply)
118 divCall := client.Go("Arith.Divide", args, quotient, nil)