rpc_$bind Library Routine

Purpose

Allocates an Remote Procedure Call (RPC) handle and sets its binding to a server.

Syntax

handle_t rpc_$bind ( object_id,  sockaddr,  slength,  status)

uuid_$t *object_id;
socket_$addr_t *sockaddr;
unsigned long slength;
us_$t *status;

Description

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.

Note: This routine is used by clients only.

Parameters

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.

Return Values

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.

Examples

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.