Implement a simple chat server.