What is the role of `flush()` in socket communication?
The `flush()` method is used to ensure that all data written to an output stream is actually sent to the client immediately.
Excellent! You understand the purpose of the `flush()` method.
Can you explain when you would need to call `flush()` in a scenario where you are sending multiple messages to the client?