P6.4: Realtime Chat Client
HTTP requests follow a one-way request-response cycle: the client asks for data, and the server responds. If the server has new data (like a new message in a chat room), it cannot push it to the client.
To build real-time collaborative applications, we must use WebSockets, which open a persistent, two-way connection between the client and server.