Skip to content

AdaoG0n/minitalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minitalk

Minitalk is a project from 42 school that explores fundamental concepts of interprocess communication (IPC) in Unix-based operating systems.
The goal is to implement a messaging system between two programs using signals (SIGUSR1 and SIGUSR2).
This project provides a hands-on introduction to signal handling and process communication in a Linux environment.

Project Objective

Develop two programs:

  1. Server:

    • Waits for messages sent by the client.
    • Displays received messages in the terminal.
  2. Client:

    • Sends a string to the server, character by character, encoding data using signals (SIGUSR1 and SIGUSR2).

Key Concepts

  • Signals:
    • Signals are a form of asynchronous communication between processes in Unix. Examples: SIGUSR1 and SIGUSR2.
  • Interprocess Communication (IPC):
    • The exchange of information between two separate processes.
  • Signal Handling:
    • Using functions like signal() or sigaction() to handle signals.

Features

  • Sending and receiving messages between client and server.
  • Accurate signal decoding to reconstruct the original message.
  • Error handling for issues such as lost signals or interruptions.

Technologies Used

  • Language: C
  • Operating System: Unix/Linux
  • Advanced Concepts: Signal handling, IPC.

How to Use

  1. Compile the programs:

    make
    
  2. Run the server to get its PID:

    ./server
    
  3. Run the client to send a message:

    ./client <server_PID> "Your message here"
    

Project Requirements

  • Only functions authorized by 42 can be used.
  • The client must be able to send messages of any length.
  • The server must display the complete message, even if transmission is slow.

Testers

minitalk
francinette
minitalk-Tester
Lipsum generator: Lorem Ipsum
Get Emoji
EmojiDB

Useful links

Resource
Bitwise Operators in C/C++
How to use signal handlers in C language?
include/linux/signal.h - Linux source code (v6.6.2)
Beej's Guide to C Programming - 29 Signal Handling
Beej's Guide to C Programming - Bit-Fields
Beej's Guide to C Programming - What is Unicode?
42-Bitwise_Operators
Sending and Handling Signals in C (kill, signal, sigaction)
Short Introduction to Signals in C
Handling Signals
BIT_a_BIT viewer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published