CNode::ConnectedThroughNetwork

Get network the peer connected through.

Synopsis

Declared in <net.h>

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.