[#GetLocalAddrForPeer]
= GetLocalAddrForPeer
:mrdocs:

Returns a local address that we should advertise to this peer&period;

== Synopsis

Declared in `&lt;net&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::optional&lt;CService&gt;
GetLocalAddrForPeer(xref:CNode.adoc[CNode]& node);
----

== Return Value

the address to advertise, or std&colon;&colon;nullopt if none is suitable&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *node*
| the peer we would advertise the address to&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
