Contained WithinFind More DocumentationFeatured Support Resources | Download this book in PDF (3146 KB)
clnt_perror(3NSL)Name | Synopsis | Description | Attributes | See Also Name
Synopsis#include <rpc/rpc.h>
enum clnt_stat clnt_call(CLIENT *clnt, const rpcproc_t procnum,
const xdrproc_t inproc, const caddr_t in, const xdrproc_t outproc,
caddr_t out, const struct timeval tout);
enum clnt_stat clnt_send (CLIENT *clnt, const u_long
procnum, const xdrproc_t proc, const caddr_t in);
bool_t clnt_freeres(CLIENT *clnt, const xdrproc_t outproc,
caddr_t out);
void clnt_geterr(const CLIENT *clnt, struct rpc_err *errp); void clnt_perrno(const enum clnt_stat stat); void clnt_perror(const CLIENT *clnt, const char *s); char *clnt_sperrno(const enum clnt_stat stat); char *clnt_sperror(const CLIENT *clnt, const char *s);
enum clnt_stat rpc_broadcast(const rpcprog_t prognum,
const rpcvers_t versnum, const rpcproc_t procnum,
const xdrproc_tinproc, const caddr_t in,
const xdrproc_t outproc, caddr_t out,
const resultproc_t eachresult, const char *nettype);
enum clnt_stat rpc_broadcast_exp(const rpcprog_t prognum,
const rpcvers_t versnum,const rpcproc_t procnum,
const xdrproc_txargs, caddr_t argsp, const xdrproc_txresults,
caddr_t resultsp, const resultproc_t eachresult, const int inittime,
const int waittime, const char *nettype);
enum clnt_stat rpc_call(const char *host, const rpcprog_t prognum,
const rpcvers_t versnum, const rpcproc_t procnum, const xdrproc_t inproc,
const char *in, const xdrproc_t outproc, char *out, const char *nettype);
Description
RPC library routines allow C language programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a request to the server. Upon receipt of the request, the server calls a dispatch routine to perform the requested service and then sends back a reply. The clnt_call(), rpc_call(), and rpc_broadcast() routines handle the client side of the procedure call. The remaining routines deal with error handling. Some of the routines take a CLIENT handle as one of the parameters. A CLIENT handle can be created by an RPC creation routine such as clnt_create(). See rpc_clnt_create(3NSL). These routines are safe for use in multithreaded applications. CLIENT handles can be shared between threads; however, in this implementation requests by different threads are serialized. In other words, the first request will receive its results before the second request is sent. RoutinesSee rpc(3NSL) for the definition of the CLIENT data structure. AttributesSee attributes(5) for descriptions of the following attributes:
See AlsoSunOS 5.10 Last Revised 1 Aug 2001Name | Synopsis | Description | Attributes | See Also |
||||||||||||