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
+11.7k Golang : How to detect a server/machine network interface capabilities?
+9.4k Golang : Launch Mac OS X Preview (or other OS) application from your program example
+10.4k Golang : cannot assign type int to value (type uint8) in range error
+14.6k Golang : Send email with attachment(RFC2822) using Gmail API example
+15.9k Golang : Read a file line by line
+16.9k Golang : Set up source IP address before making HTTP request
+22.2k Golang : Convert seconds to minutes and remainder seconds
+6.1k nginx : force all pages to be SSL
+32.1k Golang : Validate email address with regular expression
+9.8k Golang : Get current, epoch time and display by year, month and day
+15.6k Golang : rune literal not terminated error