Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A small data exchange program using UNIX signals. Built as part of the 42 school curriculum.

Notifications You must be signed in to change notification settings

WaPoco/Minitalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

49 Commits

Repository files navigation

πŸ›°οΈ Minitalk

Minitalk demonstrates how two programms β€” a client and a server β€” can communicate using Unix signals as a data transmission medium. The client sends messages bit-by-bit using:

  • SIGUSR1 β†’ represents binary 0
  • SIGUSR2 β†’ represents binary 1

A handshake mechanism ensures that each bit is acknowledged before the next is sent, guaranteeing error-free transmission β€” even for Unicode characters. This handshake mechanism makes Minitalk a simple but robust example of inter-process communication.


✨ Features

  • Unicode support (multi-byte message handling)
  • Error-free transmission using handshake acknowledgment
  • Runs entirely over Unix signals
  • Lightweight and easy to understand

πŸ“š Table of Contents


πŸ“ Project Structure

  • server.c – Handles incoming signals and prints the received message.
  • client.c – Sends the message bit by bit to the server.
  • libft/ – (If applicable) Custom implementations of common C functions.
  • Makefile – Builds the client and server binaries.

βš™οΈ Installation

Clone the repository

git clone https://github.com/WaPoco/Minitalk

Change directories

cd minitalk

Compile both server and client

make

At the end to clean up

make fclean

πŸš€ Usage

Start the server (prints its PID)

./server

In another terminal:

Send a message from the client (use the server PID)

./client <server_pid> "Your message here"

πŸ›  How It Works

  1. Client converts each character to bits.

  2. Sends SIGUSR1 for 0 and SIGUSR2 for 1.

  3. Server collects bits into bytes and writes characters.

  4. Server acknowledges each received bit.

  5. Client proceeds only after ack.

About

A small data exchange program using UNIX signals. Built as part of the 42 school curriculum.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /