Continuation of #26078.
To improve readability instead of returning a bool and passing stuff by reference, this PR changes:
LookupHost
to returnstd::vector<CNetAddr>
LookupHost
to returnstd::optional<CNetAddr>
Lookup
to returnstd::vector<CService>
Lookup
to returnstd::optional<CService>
.LookupIntern
to returnstd::vector<CNetAddr>
As discussed in #26078, it would be better to avoid using optional
in some cases, but for specific Lookup
and LookupHost
functions it’s necessary to use optional
to verify if they were able to catch some data from their overloaded function.