Minitalk is a 42 Network project that introduces inter-process communication (IPC) through signals in Unix systems. The goal is to create a communication program consisting of a server and a client. The server receives messages sent by the client and displays them.
- Communication between client and server using Unix signals (
SIGUSR1
andSIGUSR2
). - Send and display ASCII characters one bit at a time.
- Handle edge cases such as null strings and invalid PIDs.
- server.c: Implements the server program that listens for and processes messages from the client.
- client.c: Implements the client program that encodes and sends messages to the server.
- Makefile: Automates compilation of the project.
Use the provided Makefile
to compile the project:
make
This generates the server
and client
executables.
Start the server to obtain its Process ID (PID):
./server
The server will output its PID. For example:
Server PID: 12345
Run the client with the server's PID and the message you want to send:
./client <server_pid> "Your message here"
Example:
./client 12345 "Hello, world!"
The server will display the message upon receiving it.
- Handle errors gracefully, such as invalid PIDs or signal interruptions.
- The communication should be precise, ensuring all characters are sent and received correctly.
- Support Unicode characters.
- Add a feature for the client to acknowledge that the message was successfully received.