The Server package contains the Register function. Main package implements the QueryUser function that does the work of querying the DB. When Main calls Server.Register to register the function with Server, it sends the function name (QueryUser) and..something else? Is that the memory address of QueryUser on my computer? And when Server actually runs the function, it's just pointing to QueryUser at the memory address given to it by Main?
If that's the case, am I correct in thinking that this wouldn't work as written if the Server package were running on a different physical server, because it obviously wouldn't be able to access the memory location of QueryUser on a different machine. So in this case, the Server would need to implement QueryUser itself on its hardware, but otherwise would work.
Or maybe the use case of RPCs isn't for two servers communicating, but rather for two different programs on the same machine only? Or maybe what Server.Register receives is the actual function, not just the memory location (though I see no evidence of this).
Can someone help enlighten me?