Implemented the client-server functionality on the local host