[#CNode-ConnectedThroughNetwork] = xref:CNode.adoc[CNode]::ConnectedThroughNetwork :relfileprefix: ../ :mrdocs: Get network the peer connected through. == Synopsis Declared in `<net.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:Network.adoc[Network] ConnectedThroughNetwork() const; ---- == Description Returns Network::NET_ONION for _inbound_ onion connections, and CNetAddr::GetNetClass() otherwise. The latter cannot be used directly because it doesn't detect the former, and it's not the responsibility of the CNetAddr class to know the actual network a peer is connected through. == Return Value network the peer connected through. [.small]#Created with https://www.mrdocs.com[MrDocs]#