A library for client-server applications based on custom protocols