ares_reinit - ReInitialize a resolver channel from system configuration.
#include <ares.h> int ares_reinit(ares_channel_t *channel)
The ares_reinit function re-reads the system configuration and safely applies the configuration to the existing channel. System configuration will never override user-provided settings such as provided via ares_init_options or ares_set_servers.
Any existing queries will be automatically requeued if the server they are currently assigned to is removed from the system configuration.
This function may cause additional file descriptors to be created, and existing ones to be destroyed if server configuration has changed. If this is called from a thread other than which the main program event loop is running, care needs to be taken to ensure any file descriptor lists are updated immediately within the eventloop.
ares_reinit can return any of the following values:
ARES_SUCCESS Initialization succeeded.
ARES_EFILE A configuration file could not be read.
ARES_ENOMEM The process's available memory was exhausted.
This function was first introduced in c-ares version 1.22.0.
Copyright (C) 2023 The c-ares project and its members.
This HTML page was made with roffit.