im making a chat in C using TCP connection between client and server. Im running that on linux terminal.
First of all i run the server on one terminal, and then every client on another one. Everything is done except one thing.
I want that the client program will catch a click on the X button on the terminal or closing the program with CTRL+C ,and before the process die send a message to the server.
There is a way to do such thing?
Thank you, Dudu.