[#AddrMan-Select] = xref:AddrMan.adoc[AddrMan]::Select :relfileprefix: ../ :mrdocs: Choose an address to connect to. == Synopsis Declared in `<addrman.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<CAddress, NodeSeconds> Select( bool new_only = false, std::unordered_set<Network> const& networks = {}) const; ---- == Return Value CAddress The record for the selected peer. seconds The last time we attempted to connect to that peer. == Parameters [cols="1,4"] |=== | Name| Description | *new_only* [in] | Whether to only select addresses from the new table. Passing `true` returns an address from the new table or an empty pair. Passing `false` will return an empty pair or an address from either the new or tried table (it does not guarantee a tried entry). | *networks* [in] | Select only addresses of these networks (empty = all). Passing networks may slow down the search. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#