Giter Club home page Giter Club logo

42_minitalk's Introduction

minitalk

Overview

This project is a small data exchange program using UNIX signals. You need to communicate two separate proccesses. One of them will be the server and the other one will be the client.

Key Features

The project is divided into two parts Mandatory and Bonus, every part has two programs, one for the server and the other one for the client.

  • server: The server runs first, displays its PID, and waits for the client to send a message.
  • client: The client takes the server's PID and a string as arguments, sends the string to the server.

The server displays the string. the string can contain Unicode characters in the bonus part.

Getting Started

To get started using minitalk, you need to clone the repository and run the following commands:

git clone https://github.com/whoismtrx/42_minitalk.git minitalk
cd minitalk
make

Usage

To run the server, you should run the executable named server with no arguments:

./server
PID : 12345

To run the client, you need to provide the server's PID and a string as arguments:

./client 12345 "Hello, World!"

Implementation

The server and the client communicate using UNIX signals SIGUSR1 and SIGUSR2. The server waits for the client to send a signals, the client iterates over the string characters, looks for the bit representation of the characters, and sends a signal to the server for each bit, SIGUSR1 or SIGUSR2 for 1 or 0 it's depending on the bit value and what signal you choose to represent it. The server receives the signals and reconstructs the string.

Resources

42_minitalk's People

Contributors

whoismtrx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.