Associates a Remote Procedure Call (RPC) handle with a server.
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.
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. |
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);