Skip to content

42 Madrid Common Core project in which you have to code a small server-client data exchange program with UNIX signals.

Notifications You must be signed in to change notification settings

RaulSoftDev/minitalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minitalk

Minitalk is a 42 Madrid Common Core project in which you have to code a small server-client data exchange program unsing UNIX signals.

About the project

Minitalk implements a UNIX signals based server-client communication system. The client sends input text converted to binary to the server through the user UNIX signals: SIGUSR1 and SIGUSR2. The server receive the transmission and decodes the text converting it back from binary and displaying it.

Mandatory parts

  • The server must be launched first and will show its PID (process identifier).
  • The client must receive as arguments the server PID and the string text to be sended.
  • The server will receive the string text from the client and displays it almost instantly.
  • The server can receive string texts from multiple clients without restarting.
  • For the transmission you can only use the custom user UNIX signals: SIGUSR1 and SIGUSR2.

Instructions

  • The executables must be named server and client.
  • There must be a Makefile that will compile the project.
  • The program must be coded in C and must comply with 42 Norm.
  • The program must compile with the -Wall -Wextra -Werror compiler flags.
  • The program must handle possible errors: segmentation fault, bus error, double free, etc...
  • The program mustn't have memory leaks.
  • The use of global parameters is limited to only two: one for the server and one for the client.

Compilation

Requirements

  • C compiler: gcc, cc, etc...
  • make utility.
  • libft library in the project root folder.

Make commands

  • make: compile project.
  • make clean: deletes compilation files except the executables.
  • make fclean: deletes all compilation files.
  • make re: executes make fclean and make.

Build project

  1. Clone the repository:

    git clone https://github.com/RaulSoftDev/minitalk.git cd minitalk/
  2. Build the project:

    make
  3. Execute the server:

    ./server
  4. Execute the client in another terminal:

    ./client <PID> <String>

About

42 Madrid Common Core project in which you have to code a small server-client data exchange program with UNIX signals.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published