next up previous contents
Next: Server functions Up: Functions in the generated Previous: XDR functions

Client side functions

CLIENT* <interface>_bind(char*host, u_long pno, u_long vno, char*protocol)


Parameters:

host
the host name of the RPC server
pno
the RPC program number. When this is 0, the one specified in the interface is used.
vno
the RPC version number. When this is 0, the one specified in the interface is used.
protocol
``tcp" or ``udp". When this is 0, the one specified in the interface is used.

Return value: On success, it returns a pointer to CLIENT struct. On failure, it returns NULL.

This function binds the client to the RPC server specified by the parameters. All subsequent RPC calls go to the specified server. The client application may save the returned client handle, so it can talk to multiple servers.

void <interface>_bind_handle(CLIENT*pclnt)


Parameters:

pclnt
a valid client handle returned from a previous call to <interface>_bind().

This function binds the client to a previously bound server. All subsequent RPC calls go to this server.

void <interface>_unbind(CLIENT*pclnt)


Parameters:

pclnt
a client handle returned from a previous call to <interface>_bind(). If this is NULL, defaults to the current client handle.

This function unbinds the client to a server.

enum clnt_stat <interface>_errno(CLIENT*pclnt)


Parameters:

pclnt
a client handle returned from a previous call to <interface>_bind(). If this is NULL, defaults to the current client handle.

This function returns the RPC call status after an RPC has been made. If this is not RPC_SUCCESS, an error condition has occured.



Copyright (C) Netbula LLC, 1996