add support for peer discovery to PeerManager and example of usage to examples/