PreviousNext

RPC Application Components That Work Together

The following figure shows the roles of application code, RPC stubs, and RPC runtimes during a remote procedure call.


Interrelationships During a Remote Procedure Call

The following steps describe the interrelationships of the components of RPC applications, as shown in the previous figure:

1. The client's application code invokes a remote procedure call, passing the input arguments to the stub for the particular RPC interface.

2. The client's stub marshals the input arguments and dispatches the call to the client's RPC runtime.

3. The client's RPC runtime transmits the input arguments to the server's RPC runtime, which dispatches the call to the server stub for the RPC interface of the called procedure.

4. The server's stub unmarshals the input arguments and passes them to the called remote procedure.

5. The procedure executes and then returns any results (output arguments or a return value or both) to the server's stub.

6. The server's stub marshals the results and returns them to the server's RPC runtime.

7. The server's RPC runtime transmits the results to the client's RPC runtime, which dispatches them to the correct client stub.

8. The client's stub unmarshals output arguments and returns them to the calling code.