(no title)
aksx | 6 years ago
This is correct, let me unpack this a little more.
The 'Register' function tells the server object that when a client tries to call the function "QueryUser" call the function passed as the second parameter and send back the result.
the client object's "CallRPC" functions tells the client object that i know that there is a function called "QueryUser" that the server know about and it has the same structure as the second parameter, when i call the second parameter, call the server with the arguments passed. The client object then creates a stub implementation which when called, creates a connection to the server, tell the server to call the function "QueryUser" with the given parameters, reads the results and returns the result.
The "Remote" part of RPC is done over the transport package which the main function is mostly unaware of.
No comments yet.