OSF DCE Application Development Guide--Core Components
OSF DCE Application Development Guide—Core Components
4. The first remote procedure then resumes executing the initial call.
Figure 16-1. Phases of a Nested RPC Call
First server
Call thread (acting as a client)
4
Calling
code
A client application
thread
1
2 3
Call thread
Second server
remote
procedure
Second
remote
procedure
First
Client
Nested RPC thread
RPC thread
A specialized form of a nested remote procedure call involves a called remote procedure
that is making a remote procedure call (callback) to the address space of the calling
client application thread. Calling the client’s address space requires that a server
application thread be listening in that address space. Also, the second remote procedure
needs a server binding handle for the address space of the calling client.
The remote procedure can ask the local RPC runtime to convert the client binding
handle, provided by the server runtime, into a server binding handle. This is done by
calling the rpc_binding_server_from_client() routine. This routine returns a partially
bound binding handle (the server binding information lacks an endpoint). For a nested
remote procedure call to find the address space of the calling client, the application must
ensure that the partially bound binding handle is filled in with the endpoint of that
address space. The the rpc_binding_server_from_client(3rpc) reference page
discusses alternatives for ensuring that the endpoint is obtainable for a nested remote
procedure call.
Using the server binding handle, a remote procedure can attempt a nested remote
procedure call. The nested call involves the general phases illustrated by Figure 16-2.
Figure 16-2. Phases of a Nested RPC Call to Client Address Space
16 − 32 Tandem Computers Incorporated 124245