{"author":"Stefan Eissing","author_email":"stefan@eissing.org","author_time":1744375425,"commit_time":1744788860,"committer":"Daniel Stenberg","committer_email":"daniel@haxx.se","hash":"56e40ae6a532850b5037ccfb528ed44f09f3d484","message":"asyn resolver code improvements\n\n\"asyn\" is the internal name under which both c-ares and threaded\nresolver operate. Make the naming more consistent. Implement the c-ares\nresolver in `asyn-ares.*` and the threaded resolver in `asyn-thrdd.*`.\nThe common functions are in `asyn-base.c`.\n\nWhen `CURLRES_ASYNCH` is defined, either of the two is used and\n`data->state.async` exists. Members of that struct vary for the selected\nimplementation, but have the fields `hostname`, `port` and `ip_version`\nalways present. This are populated when the async resolving starts and\neliminate the need to pass them again when checking on the status and\nprocessing the results of the resolving.\n\nAdd a `Curl_resolv_blocking()` to `hostip.h` that relieves FTP and SOCKS\nfrom having to repeat the same code.\n\n`Curl_resolv_check()` remains the function to check for status of\nongoing resolving. Now it also performs internally the check if the\nneeded DNS entry exists in the dnscache and if so, aborts the asnyc\noperation. (libcurl right now does not check for duplicate resolve\nattempts. an area for future improvements).\n\nThe number of functions in `asyn.h` has been reduced. There were subtle\ndifference in \"cancel()\" and \"kill()\" calls, both replaced by\n`Curl_async_shutdown()` now. This changes behaviour for threaded\nresolver insofar as the resolving thread is now always joined unless\n`data->set.quick_exit` is set. Before this was only done on some code\npaths. A future improvement would be a thread pool that keeps a limit\nand also could handle joins more gracefully.\n\nDoH, not previously tagged under \"asny\", has its struct `doh_probes` now\nalso in `data->state.async`, moved there from `data->req` because it\nmakes more sense. Further integration of DoH underneath the \"asyn\"\numbrella seems like a good idea.\n\nCloses #16963\n","parents":["be718daf995b620dd8bf89d725d1c4c031b3840a"],"tree_hash":"46b800da0059bc4859c32dab1dbe51c8142137ee"}