An open API service indexing awesome lists of open source software.

https://github.com/link-wolf/minitalk

42 project - Small server and client using UNIX signals
https://github.com/link-wolf/minitalk

42 42born2code 42school c macos

Last synced: 2 months ago
JSON representation

42 project - Small server and client using UNIX signals

Awesome Lists containing this project

README

          


Link-Wolf - minitalk
42 grade - 125 / 100
Year - 2022
stars - minitalk
forks - minitalk
issues - minitalk
OS - macOS





Logo

Minitalk


Ping ? Pong !

Small server and client using UNIX signals




Report Bug
·
Request Feature


Table of Contents



  1. About The Project


  2. Getting Started


  3. Usage

  4. Roadmap

  5. Contributing

## About The Project



minitalk header

This project is focused on our first server and client to send/receive data (string) only by using `SIGUSR1` and `SIGUSR2` UNIX signals

- The server must print its `PID` when launched
- The client must be launched by specifying the server `PID` and the string to send
- The server must be able to receive data from different clients without being rebooting

As bonuses features :

- The server should answer when all the data is successfully received
- The client should print the answer sent by the server
- Both client and server should support Unicode characters

To do all of this, I used both SIGUSR1 & SIGUSR2 signals as binary instructions to encode and decode the informations

(back to top)

## Getting Started

Because they're simple C programs, there isn't much to say here

### Prerequisites

Having a C compiler like cc, gcc or clang

### Installation

1. Clone the repo
```sh
git clone https://github.com/Link-Wolf/minitalk.git
```
2. Compile minitalk
```sh
cd minitalk; make
```
3. Start the server
```sh
./server
```
4. Start the client in another terminal, by specify the server `PID` (printed by the server when started) and the data to send
```sh
./client 21502 "my awesome data"
```

(back to top)

## Usage

Test this minitalk with whatever you want, any-size strings, even with unicode !

#### Server

```sh
./server
```

Immediate output :

```sh
21502
```

#### Client

```sh
./client 21502 "woaw it's working !"
```

### Output

#### Server

```
woaw it's working !
```

#### Client

```
> Your message has been correctly shreked to the server my dude ! \_ÒwÓ_/
```

_(Of course you can change the confirmation message)_

(back to top)

## Roadmap

- [x] Add server answer
- [x] Add unicode support

See the [open issues](https://github.com/Link-Wolf/minitalk/issues) for a full list of proposed features (and known issues).

(back to top)

## Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

(back to top)