jpayne@68: .\" jpayne@68: .\" Copyright 1998 by the Massachusetts Institute of Technology. jpayne@68: .\" SPDX-License-Identifier: MIT jpayne@68: .\" jpayne@68: .TH ARES_DESTROY 3 "7 December 2004" jpayne@68: .SH NAME jpayne@68: ares_destroy \- Destroy a resolver channel jpayne@68: .SH SYNOPSIS jpayne@68: .nf jpayne@68: #include jpayne@68: jpayne@68: void ares_destroy(ares_channel_t *\fIchannel\fP) jpayne@68: .fi jpayne@68: .SH DESCRIPTION jpayne@68: The \fBares_destroy(3)\fP function destroys the name service channel jpayne@68: identified by \fIchannel\fP, freeing all memory and closing all sockets used jpayne@68: by the channel. jpayne@68: jpayne@68: \fBares_destroy(3)\fP invokes the callbacks for each pending query on the jpayne@68: channel, passing a status of \fIARES_EDESTRUCTION\fP. These calls give the jpayne@68: callbacks a chance to clean up any state which might have been stored in their jpayne@68: arguments. A callback must not add new requests to a channel being destroyed. jpayne@68: jpayne@68: There is no ability to make this function thread-safe. No additional calls jpayne@68: using this channel may be made once this function is called. jpayne@68: .SH SEE ALSO jpayne@68: .BR ares_init (3), jpayne@68: .BR ares_cancel (3), jpayne@68: .BR ares_threadsafety (3)