'For a substrate node, how would you access the information around currently connected/known peer nodes in the network?

Looking to access the information within a substrate node around it's current and known peers from within the node itself.

Examples will be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source