Golang net/rpc.Client.Call() function example
package net/rpc
Golang net/rpc.Client.Call() function usage example
type Args struct {
A, B int
}
args := Args{8,8}
var reply int
err = client.Call("Operator.Multiply", args, &reply)
if err != nil {
panic(err)
}
fmt.Printf(" %d * %d = %d \n ", args.A, args.B, reply)
Reference :
Advertisement
Something interesting
Tutorials
+5.2k Golang : Calculate half life decay example
+7.8k Golang : Scan files for certain pattern and rename part of the files
+21.8k Golang : Upload big file (larger than 100MB) to AWS S3 with multipart upload
+10.6k Golang : Simple File Server
+22.7k Golang : Strings to lowercase and uppercase example
+30k Golang : Get time.Duration in year, month, week or day
+17.2k Golang : When to use init() function?
+7.3k Golang : alternative to os.Exit() function
+13.9k Golang : Get dimension(width and height) of image file
+5.2k JavaScript/JQuery : Redirect page examples
+5.8k Linux : Disable and enable IPv4 forwarding
+13k Golang : Get terminal width and height example