HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)

r
rpc_clnt_create(3N) rpc_clnt_create(3N)
CLSET_XID unsigned long * set the XID of the next
remote procedure call
CLGET_PROG rpcprog_t get program number
CLSET_PROG rpcprog_t set program number
The following operations are valid for connection-oriented transports only:
CLSET_IO_MODE rpciomode_t * set the IO mode used
to send one-way requests.
The argument for this operation can be either:
RPC_CL_BLOCKING
All sending operations block until the underlying transport protocol has accepted requests. If
you specify this argument you cannot use flush and getting and setting buffer size is meaning-
less.
RPC_CL_NONBLOCKING
Sending operations do not block and return as soon as requests enter the buffer. You can now
use non-blocking I/O. The requests in the buffer are pending. The requests are sent to the
server as soon as a two-way request is sent or a flush is done. You are responsible for flushing
the buffer. When you choose the RPC_CL_NONBLOCKING
argument you have a choice of flush
modes as specified by
CLSET_FLUSH_MODE
.
CLGET_IO_MODE rpciomode_t * get the current IO mode
CLSET_FLUSH_MODE rpcflushmode_t * set the flush mode
The flush mode can only be used in non-blocking I/O mode. The argument for this operation can be
either:
RPC_CL_BESTEFFORT_FLUSH
All flushes send requests in the buffer until the transport end-point blocks. If the transport con-
nection is congested, the call returns directly.
RPC_CL_BLOCKING_FLUSH
Flush blocks until the underlying transport protocol accepts all pending requests into the queue.
CLGET_FLUSH_MODE rpcflushmode_t * get the current flush mode
CLFLUSH rpcflushmode_t flush the pending requests
This command can only be used in non-blocking I/O mode. The flush policy depends on which of the
following parameters is specified:
RPC_CL_DEFAULT_FLUSH or NULL
The flush is done according to the current flush mode policy (see the CLSET_FLUSH_MODE
option).
RPC_CL_BESTEFFORT_FLUSH
The flush tries to send pending requests without blocking; the call returns directly. If the tran-
sport connection is congested, this call could return without the request being sent.
RPC_CL_BLOCKING_FLUSH
The flush sends all pending requests. This call will block until all the requests have been
accepted by the transport layer.
CLSET_CONNMAXREC_SIZE int * set the buffer size
CLGET_CONNMAXREC_SIZE int * get the current size of the
buffer
CLGET_CURRENT_REC_SIZE int * get the size of the pending
requests stored in the
buffer. Use of this command
is only recommended when you
are in non-blocking I/O
mode. The current size of
the buffer is always zero
when the handle is in
blocking mode as the buffer
HP-UX 11i Version 3: February 2007 3 Hewlett-Packard Company 315