The svc_destroy routine returns all the private data structures associated with a server handle. If the server-handle creation routine received the value RPC_ANYSOCK as the socket, svc_destroy closes the socket. Otherwise, your program must close the socket.