clnt_control()--Change Information about a Client Object


  Syntax

 #include <rpc/rpc.h>

 bool_t clnt_control(CLIENT *clnt,
                     const u_int req,
                     char *info);

  Service Program Name: QZNFTRPC

  Default Public Authority: *USE

  Threadsafe: No

The clnt_control() function is used to change or retrieve information about a client object. For both connectionless and connection-oriented transports, the supported values for req, their argument types, and what they do follow:



Parameters

clnt  (Input) 
A pointer to the client handle structure.

req  (Input) 
The type of operation.

info  (Input/Output) 
A pointer to the information for request type. The info parameter is expected to be a pointer to an appropriate structure. The nature of the structure depends on the req parameter.

Authorities

No authorization is required.


Return Value



Error Conditions

Failure is returned only when a bad format of parameters is detected. For example, the info parameter is NULL, when a pointer to a timeval structure is expected.


Error Messages



Example

The following example shows how clnt_control() is used.

Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.

#include <rpc/rpc.h>

main()
{
  CLIENT *clnt;
  int fd;

  ...

  /* Get the associated file descriptor */
  clnt_control(clnt, CLGET_FD, (int *)&fd);
  ...

}

Notes

  1. If the time-out is set using the clnt_control() API, the timeout parameter passed to the clnt_call() API will be ignored in all future calls.
  2. The retry time-out is the time that the connectionless RPC client waits for the server to reply before retransmitting the request.


API introduced: V4R2

[ Back to top | Remote Procedure Call (RPC) APIs | APIs by category ]