make the server and client protocol-independent