This project was graded 125/100.
Compiling an running a single program is fine, but have you run 2 programs and made them communicate? Have you worked with signals? What about bits manipulation?
At 42, the C projects are built following a bunch of rules that enforce good coding style. Some of them are:
- No for, do while, switch, case or goto are allowed
- No more than 25 lines per function and 5 functions per file
- No assigns and declarations in the same line (unless static)
- No more than 5 variables in 1 function
...
Part | File Name | Functionality |
---|---|---|
Mandatory | ft_printf/ | Contains the files from the ft_printf project |
includes/ | Contains the header files needed to include | |
client.c | The client file which is used to send the string to the server using signals | |
server.c | The server file which is used to receive the string and handle the signals sent from the client | |
utils.c | Contains utilitary functions developed exclusively for this project | |
Bonus | client_bonus.c | The client file which is used to send the string to the server using signals. Can also send emojis and should receive a signal at the end of the transmission |
server_bonus.c | The server file which is used to receive the string and handle the signals sent from the client. It sends a signal at the end of the transmission |
To compile the library you can either run make
or make bonus
in the terminal. Both make
and make bonus
will compile and link all files together.
The make
rule will generate 2 executables called client
and server
, one for each of the needed programs.
The make bonus
rule will generate 2 executables called client_bonus
and server_bonus
, one for each of the needed programs.
To run the programs, just run the following commands, each in a different terminal:
./server
./client [SERVER PID] [MESSAGE]
This project was tested using manual revision only.
Feel free to ask me any questions through Slack (ncarvalh).