Suppose I have a multi client broadcast server. One client sends a string, every client receives it. The client read thread reads the input from the client
Client reads from the client? And what does the server?
Is there a way it can be done without allocation?
There are innumerable ways to do multithreaded programming. They have different tradeoffs in speed, safety and resource consumption.