Originally Posted By: Carlos3DGS
It is so a system can tell another system to call a function (with parameters).


Explained a little better...

In some situations (like a mmorpg) you dont want the client to calculate everything to avoid cheating and other things, and because the database for everything is only on the server.

So when the client wants his character to "hit" a different character:
The client sends an order to the server to invoke the "calculate_hit()" function with the parameters (attacking_character, hit_character).

the server recieves that remote proceure call and runs the function:
calculate_hit(attacking_character, hit_character)
{
...
lookup in charatcer database: attacking_character's weapon_ID
lookup in weapon database: weapon_ID's damage
...
lookup in character database: hit_character's armour_ID
lookup in armour database: armour_ID's defence
...
total_damage = damage - defence
...
write in character database: hit_character.life -= total_damage
...
and after all this server does another remote procedure call to clients...
}


The server would do a remote procedure call to the client for them to call their function "reduce_life()" with the parameters (character_ID, total_damage).
The clients recieve that remote procedure call and run the function:
reduce_life(character_ID, total_damage)
{
...
character_ID.life -= total_damage
...
}


This is just an example situation to better explain what is a remote procedure call in both directions (client->server and server->clients).
Basically it is just "tell this other system to run this function (with these parameters)".
To do that of course we would have to make all the functions on the client, and the server has to know the name of all those functions for a remote procedure call to the server->clients.
And for the clients to do a remote procedure call on the server client->server: the server has to have the functions, and the clients need to have the name of the functions they want the server to run.


"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1