The purpose of this project is to code a small data exchange program using UNIX signals.
Grade : 125/100
Subjects v.3 : FR EN
42 Norm v.4 : FR EN
The project contains two programs server and client.
- At launch,
serverprints its PID and waits for incoming messsages. - The
clienttakes to arguments : theserverPID and the string to send.
Communication between the two is done only using UNIX signals SIGUSR1 and SIGUSR2. Once the server has received the entire message, it prints it and wait for new incoming messages.
To achieve this project, one must know how to use signals in a secure manner, to handle interference from external signals and ensure the integrity of the message under all circumstances. Optimization is essential to achieve quick communication between the programs. The communication itself uses binary encryption with an approach compatible with Unicode encoding.
Git clone with :
git clone https://github.com/celinenguyentu/Minitalk && cd MinitalkThis project is written in C language and need either gcc or clang compiler, with <signal.h>, <stdlib.h>, <stdarg.h> and <unistd.h> standard libraries to run.
makeormake all- compile binariesserverandclientmake bonus- compile binariesserverandclient(bonus version)make fclean- remove all object files and binaries
After compiling the binary files, open two shell windows and launch the server first :
./serverIn the other window, launch a client with the message to send :
./client <server PID> <message>In the bonus version, any client is able to quit the server by sending the message exit.
Those are third-party tester to run complementary tests, use them at your own risk :
- @ThibaudM13 minitalk-Tester
- @xicodomingues francinette
