Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pin3dev/42_minitalk
inter-process communication, using UNIX signals to transmit messages from a client to a server. Explores asynchronous communication using SIGUSR1 and SIGUSR2 signals.
https://github.com/pin3dev/42_minitalk
42-cursus 42-minitalk 42-school 42sp binary binary-data bitwise bitwise-operators minitalk minitalk42 pid process process-identifier signal-processing signals sigusr1 sigusr2 unix-signal-handling unix-signals
Last synced: 1 day ago
JSON representation
inter-process communication, using UNIX signals to transmit messages from a client to a server. Explores asynchronous communication using SIGUSR1 and SIGUSR2 signals.
- Host: GitHub
- URL: https://github.com/pin3dev/42_minitalk
- Owner: pin3dev
- Created: 2024-08-08T15:47:02.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-24T23:48:22.000Z (13 days ago)
- Last Synced: 2024-10-26T12:19:11.751Z (11 days ago)
- Topics: 42-cursus, 42-minitalk, 42-school, 42sp, binary, binary-data, bitwise, bitwise-operators, minitalk, minitalk42, pid, process, process-identifier, signal-processing, signals, sigusr1, sigusr2, unix-signal-handling, unix-signals
- Language: C
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Minitalk
Introduction •
Structure •
Docs •
Cloning •
Usage •
Norms •
Theoretical
**Minitalk** is a project where the goal is to implement a simple data exchange program using UNIX signals (`SIGUSR1` and `SIGUSR2`). The program consists of a server and a client, where the client sends a message to the server, and the server decodes and prints it.
The objective of this project is to deepen the understanding of inter-process communication (IPC) using signals, while also ensuring that the communication is efficient and error-free.
This project consists of two main parts: the **client** and the **server**.
- **Server**: The server is responsible for receiving messages from the client. It decodes the signals sent by the client and displays the message in real-time. The server can handle multiple clients sequentially.
- **Client**: The client takes two parameters, the `server's PID` and the `message` to be sent. It encodes the message as a series of signals and sends them to the server.Communication between the client and the server is done using only two UNIX signals: `SIGUSR1` and `SIGUSR2`.
For a detailed breakdown of how the project works, please visit the documentation link below:
To clone this repository and compile the project, run the following commands:
```bash
git clone https://github.com/pin3dev/42_Minitalk.git
cd 42_Minitalk/minitalk
```
This will download the project to your local machine. Once inside the `minitalk` directory, run the provided `Makefile` to compile the project.### Makefile
The project comes with a `Makefile` to automate the compilation process. The Makefile includes the following rules:
- `all`: Compiles the server and client programs.
- `clean`: Removes object files.
- `fclean`: Removes object files and the executables.
- `re`: Recompiles the entire project.To compile the project, run:
```bash
make
```
This will generate the executables `server` and `client`.### Basic Usage
1. Start the server:
```bash
./server
```
The server will display its `PID`. This is required for the client to communicate with the server.2. Send a message from the client:
```bash
./client "Your message here"
```
The client will send the message to the server, which will then print it.3. The server can handle multiple clients without needing to restart.
## ⚠️ Norms and Guidelines Disclaimer
This project follows the [**42 School Norm**](https://github.com/pin3dev/42_Cursus/blob/b9cd0fe844ddb441d0b3efb98abcee92aee49535/assets/General/norme.en.pdf) guidelines. Certain decisions in the implementation may seem unconventional, but they were necessary to comply with the strict coding standards enforced by the school.
All the theoretical material used to study and carry out this project is organized in the tags described at the beginning of this README.
In addition, these materials can be accessed directly via the link provided below.