Added message polling in P2P example.