A JavaScript library for peer-to-peer communications programming