Use the threads on the server.
Server handles the SIGINT, and the client send the JOIN message.