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
+4.8k PHP : Extract part of a string starting from the middle
+21.7k Golang : Setting up/configure AWS credentials with official aws-sdk-go
+18.8k Golang : How to make function callback or pass value from function as parameter?
+6.4k Golang : How to search a list of records or data structures
+19.3k Golang : Get RGBA values of each image pixel
+9.9k Golang : Check if user agent is a robot or crawler example
+8.5k Golang : How to check if input string is a word?
+21.6k Golang : Encrypt and decrypt data with TripleDES
+5.6k Unix/Linux : How to find out the hard disk size?
+12.6k Golang : flag provided but not defined error
+12.1k Golang : Perform sanity checks on filename example
+30k Golang : How to declare kilobyte, megabyte, gigabyte, terabyte and so on?