clnt_destroy()--Destroy the RPC Client's Handle
Syntax
#include <rpc/rpc.h> void clnt_destroy(CLIENT *clnt);
Service Program Name: QZNFTRPC
Default Public Authority: *USE
Threadsafe: No
The clnt_destroy() API destroys the RPC client's handle. This function deallocates private data structures, including the clnt parameter itself. The use of the clnt parameter becomes undefined upon calling the clnt_destroy() API. If the RPC library opened the associated file descriptor, or was set using clnt_control(), the associated file descriptor will be closed.
The caller should call auth_destroy (before calling clnt_destroy) to destroy the associated AUTH structure.
Parameters
- clnt (Input)
- A pointer to the client handle structure.
Authorities
No authorization is required.
Return Value
None.
Error Conditions
None.
Error Messages
Message ID | Error Message Text |
---|---|
CPE3418 E | Possible APAR condition or hardware failure. |
CPF3CF2 E | Error(s) occurred during running of &1 API. |
CPF9872 E | Program or service program &1 in library &2 ended. Reason code &3. |
Related Information
svc_destroy()--Destroy an RPC Service Transport Handle
Example
The following example shows how clnt_destroy() 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; /* Create client handle */ clnt = clnt_create(..); ... /* Destroy the client handle */ clnt_destroy(clnt); exit(0); }
API introduced: V4R2
[ Back to top | Remote Procedure Call (RPC) APIs | APIs by category ]