Library for peer server and client