Unsets the binding between a Remote Procedure Call (RPC) handle and a server.
The rpc_$clear_server_binding routine removes the association between an RPC handle and a particular server (which is a particular port number), but does not remove the associations with an object and a host. For example, the routine unmaps the handle to the port number, but it leaves the object and host associated through a network address.
This routine replaces a fully bound handle with a bound-to-host handle. A bound-to-host handle identifies an object located on a particular host, but does not identify a server exporting an interface to the object.
If a client uses a bound-to-host handle to make a remote procedure call, the call is sent to the Local Location Broker (LLB) forwarding port at the host identified by the handle. If the call's interface and the object identified by the handle are both registered with the host's LLB, the LLB forwards the request to the registering server. When the client RPC runtime library receives a response, it binds the handle to the server. Subsequent remote procedure calls that use this handle are then sent directly to the bound server's port.
The rpc_$clear_server_binding routine is used for client error recovery when a server terminates. The port that a server uses when it restarts is not necessarily the same port that it used previously. Therefore, the binding that the client was using may not be correct. This routine enables the client to unbind from the nonfunctioning server while retaining the binding to the host. When the client sends a request, the binding is automatically set to the server's new port.
Input
Item | Description |
---|---|
handle | Specifies the RPC handle from which the server binding is being cleared. |
Output
Item | Description |
---|---|
status | Points to the completion status. |
To clear the server binding represented in a handle, enter:
rpc_$clear_server_binding(handle, &st);