functional basic server and client