#include <rpc/rpc.h> void clnt_destroy(CLIENT *clnt);
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.
No authorization is required.
None.
None.
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. |
svc_destroy()--Destroy an RPC Service Transport Handle
See Code disclaimer information for information pertaining to code examples.
The following example shows how clnt_destroy() is used:
#include <rpc/rpc.h> main() { CLIENT *clnt; /* Create client handle */ clnt = clnt_create(..); ... /* Destroy the client handle */ clnt_destroy(clnt); exit(0); }
Top | Remote Procedure Call (RPC) APIs | APIs by category |