Allocates an Remote Procedure Call (RPC) handle and sets its binding to a server.
The rpc_$bind function creates a fully bound RPC handle that identifies a particular object and server. This routine is equivalent to an rpc_$alloc_handle routine followed by an rpc_$set_binding routine.
Input
Item | Description |
---|---|
object_id | Points to the Universal Unique Identifier (UUID) of the object to be accessed. If there is no specific object, specify uuid_$nil as the value. |
sockaddr | Points to the socket address of the server. |
slength | Specifies the length, in bytes, of the socket address (sockaddr) parameter. |
Output
Item | Description |
---|---|
status | Points to the completion status. |
Upon successful completion, this routine returns an RPC handle (handle_t) that identifies the remote object. This handle is used as the first input parameter to remote procedure calls with explicit handles.
The following example binds a banking client program to the specified object and socket address:
h =rpc_$bind(&bank_id, &bank_loc[0].saddr, bank_loc[0].saddr_len,
&st);
The bank_loc structure is the results parameter of a previous Location Broker lookup call.