mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 07:02:11 +08:00
add chapter 15.9 (#686)
This commit is contained in:
13
eBook/examples/chapter_15/rpc/rpc_objects.go
Normal file
13
eBook/examples/chapter_15/rpc/rpc_objects.go
Normal file
@@ -0,0 +1,13 @@
|
||||
// rpc_objects.go
|
||||
package rpc_objects
|
||||
|
||||
import "net"
|
||||
|
||||
type Args struct {
|
||||
N, M int
|
||||
}
|
||||
|
||||
func (t *Args) Multiply(args *Args, reply *int) net.Error {
|
||||
*reply = args.N * args.M
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user