Skip to content

aaron-22766/42_minitalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minitalk

Bit by bit, signals make you want to quit

GitHub code size in bytes Code language count GitHub top language GitHub last commit


🗣 About

The purpose of this project is to code a small data exchange program using UNIX signals. It is an introductory project for the bigger UNIX projects that will appear later on in the cursus.

Play Demo

🛠 Usage

Requirements

The game is written in C language and thus needs the gcc compiler and some standard C libraries to run.

Instructions

Execute the binaries from different shells. First, start the server.

$> make
$> ./server
Server PID: 4242

The server will print its process id to the output. Use it as the first argument to the client and as teh second argument pass the message you want to send.

$> ./client 4242 "some_message"

You will see that the server will receive the message and print it to its output. Since the subject states to print the message after the server received it but with large messages the communication takes a lot of time, the server will store the incoming characters in a buffer and only print it once it's full or it receives a NUL-character as the indication for the end of the message.