Rewrote example peering1 using polling.