rpc_$set_binding Library Routine

Purpose

Associates a Remote Procedure Call (RPC) handle with a server.

Syntax

rpc_$set_binding ( handle,  sockaddr,  slength,  status)

struct handle_t *handle;
struct socket_$addr_t *sockaddr;
int slength;
struct status_$t *status;

Description

The rpc_$set_binding routine sets the binding of an RPC handle to the specified server. The handle then identifies a specific object at a specific server. Any subsequent remote procedure calls that a client makes using the handle are sent to this destination. This routine can also replace an existing binding in a fully bound handle, or set the binding in an unbound handle.

Note: This routine is used by clients only.

Parameters

Input

Item Description
handle Specifies an RPC handle.
sockaddr Specifies the socket address of the server with which the handle is being associated.
slength Specifies the length, in bytes, of the socket address (sockaddr) parameter.

Output

Item Description
status Specifies the completion status.

Examples

To set the binding on the m_handle handle to the first server in the results array, which was returned by a previous Location Broker lookup call, enter:

rpc_$set_binding(m_handle, &lb_reslts[0].saddr,
     lb_reslts[0].saddr_len, &st);