Question: multi thread
Multiple Clients Connect to a server and communicate among the themselves. When a new Client is connected to the server, all other clients get the notification and they can chat with each other. Similarly when a client quits all other clients get the notification and end the corresponding client.
You can use the RTMP protocol.