mcpp index

compat.c-ares

#include

c-ares — asynchronous DNS resolver library (static)

#include "ares.h"
mcpp add compat.c-ares@1.34.5

Usage

From this repository's own test project — built and run by CI, not written for the website.

// Behavioral test for compat.c-ares.
//
// Entirely OFFLINE — no DNS query is ever sent, so the result does not depend
// on the runner's network. What it does exercise is the machinery gRPC's
// resolver actually leans on, and each piece lives in a different part of the
// library:
//
//   ares_library_init / _cleanup   -> src/lib/ares_library_init.c
//   ares_init_options / ares_destroy -> ares_init.c, ares_options.c, util/*
//   set/get servers as CSV         -> ares_options.c, str/*, record/* (parsing
//                                     an address list is real string+record work)
//   ares_inet_pton / ares_inet_ntop -> inet_net_pton.c, inet_ntop.c
//   ares_strerror                  -> ares_strerror.c
//
// Returns non-zero on any mismatch.
#include <cstring>
#include <string>

#include "ares.h"

namespace {

// …

tests/examples/c-ares/tests/resolver.cpp · project tests/examples/c-ares

Build

targets
cares (lib)
language
c++23
C standard
c11
import std
no
include dirs
*/include, */src/lib, */src/lib/include, mcpp_generated

Sources (1)

  • */src/lib/**/*.c

Versions

VersionPlatforms Mirrorssha256
1.34.5 latest LinuxWindowsmacOS CN GLOBAL 7d935790e9af…