type Args struct { X, Y int } type Reply struct { Z int } func main() { client, err := rpc.DialHTTP("tcp", "localhost:1234") if err != nil { log.Fatal("dialing:", err) } args := &Args{7, 8} var reply Reply err = client.Call("Calculator.Add", args, &reply) if err != nil { log.Fatal("arith error:", err) } fmt.Printf("Calculator.Add: %d+%d=%d\n", args.X, args.Y, reply.Z) }In this example, a client is making an RPC request to a server running on localhost:1234. The client specifies the function to call ("Calculator.Add"), as well as the arguments to pass. After the server processes the request and sends a response back to the client, the Response Seq helps to ensure that the client associates the correct response with the correct request. Another package library that can be used in conjunction with net/rpc is net/http. This package is used in the example above to dial a HTTP connection to the server.