Releases: biralavor/42_minitalk
Mandatory with Bonus -- official
Mandatory working
- Makefile with instructions and a unique project header, printed on terminal
- Client with feedback, after user send the message
- Server receives the entire message, but also receives a header and tail from Client's program
Bonus working
- Server with personalized instructions, from Makefile
- Client is able to send UNICODE messages
- Client receives a Server confirmation message, for every character sent
- Server receives a message, but without header and tail (only for better confirmation char message understanding)
Mandatory with Bonus -- vogsphere
Merge pull request #2 from biralavor/bonus Mandatory with Bonus
Mandatory minitalk, now working
Now, my IPC server-client communication is working for sending a char, by converting the char into a binary signal.
(੭˃ᴗ˂)੭
Here is the Client's terminal:
In this case, making a connection with the Server's_PID 64776.
The goal was to send a string '42🤩•ᴗ•'.
I also give a user feedback, when the message is sent.
This is the Server's terminal:
I had printed a program header + program instructions, with my Makefile
The program shows the PID, and it waits for an incoming message
Here you can see a header and a tail incyan
. This is inside the original client's message. That's why the entire message is in a different color.
For every new client's message, it will be printed a header and tail.
It would be wonderful (TODO for BONUS) if:
- Client remains in a loop for sending messages
- Client receives a signal, when the server finished printing the message
Bitwise working, with better debug reading!
Now, my IPC server-client communication is working for sending a char, by converting the char into a binary signal.
(੭˃ᴗ˂)੭
Here is the Client's Terminal, in this case, making a connection with the Server's_PID 96754. The goal was to send a string '42'.
However, as my code is sending char by char, and I'm checking for debug how each char should by as binary, you can see a line for each character with the binary code:
Then, the server decode the signal binary sequence into a char again.
Caution
I've added a lot of debug prints to check incoming and out-coming signal's sequence.
That's why you can seen in GREEN '00101100'. << This is the char '4', or int 52 in ASCII. Then, you can see in CYAN the char '4' printed.
The next step is to decode the next char '2' (or '01001100'), and then print it as a char.
Now, I need to remove these debug steps OR make a branch for later studies. 🤔
Still needs to:
- add a header outside the loop, for better string conversions
- add a tail for 'end of message'
It would be wonderful (TODO) if:
- client remains in a loop for sending messages
Bitwise working!
Now, my IPC server-client communication is working for sending a char, by converting the char into a binary signal.
(੭˃ᴗ˂)੭
Here is the Client's Terminal, in this case, making a connection with the Server's_PID 96754. The goal was to send a string '42'.
However, as my code is sending char by char, and I'm checking for debug how each char should by as binary, you can see a line for each charcater with the binary code:
Then, the server decode the signal binary sequence into a char again.
Caution
I've added a lot of debug prints to check incoming and out-coming signal's sequence.
That's why you can seen in GREEN '00101100'. << This is the char '4', or int 52 in ASCII. Then, you can see in CYAN the char '4' printed.
The next step is to decode the next char '2' (or '01001100'), and then print it as a char.
Now, I need to remove these debug steps OR make a branch for later studies. 🤔
Still needs to:
- add a header outside the loop, for better string conversions
- add a tail for 'end of message'
It would be wonderful (TODO) if:
- client remains in a loop for sending messages
Server is receiving SIGUSR1
Makefile with two executables
By mandatory rules, we have to compile server
and client
executable files.
Now, my Makefile has the following instructions:
SERVER_FILES_ALL = $(addprefix $(SRC_SERVER_D), $(SERVER_FILES))
CLIENT_FILES_ALL = $(addprefix $(SRC_CLIENT_D), $(CLIENT_FILES))
.
.
.
OBJS_SERVER = $(addprefix $(BUILD_D), $(SERVER_FILES_ALL:%.c=%.o))
OBJS_CLIENT = $(addprefix $(BUILD_D), $(CLIENT_FILES_ALL:%.c=%.o))
OBJS_ALL = $(OBJS_SERVER) $(OBJS_CLIENT)
.
.
.
COMP_EXE_SERVER = $(CC) $(LDFLAGS) $(OBJS_SERVER) $(LDLIBS) -o $(NAME_SERVER)
COMP_EXE_CLIENT = $(CC) $(LDFLAGS) $(OBJS_CLIENT) $(LDLIBS) -o $(NAME_CLIENT)
minitalk_init
Just studing about:
getpid()
signal()
signal handlers