{"id":20442841,"url":"https://github.com/simon-zerisenay/42minitalk","last_synced_at":"2025-10-03T22:56:51.408Z","repository":{"id":97688339,"uuid":"607587357","full_name":"simon-zerisenay/42Minitalk","owner":"simon-zerisenay","description":"42 Minitalk: Minitalk is a project that involves creating a client-server communication system using signals. The goal is to implement a client program that can send messages to a server program using signals, which are then displayed by the server.","archived":false,"fork":false,"pushed_at":"2024-04-23T11:19:14.000Z","size":1160,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T23:44:59.503Z","etag":null,"topics":["42abudhabi","42school","c","clientservercommunication","cprogramming","ecole42","minitalk","server","signals","sigusr1","sigusr2"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simon-zerisenay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-28T09:22:40.000Z","updated_at":"2025-01-14T23:34:14.000Z","dependencies_parsed_at":"2024-04-23T12:42:48.797Z","dependency_job_id":"55ebd50b-3104-4459-ae33-f6eefff0ed42","html_url":"https://github.com/simon-zerisenay/42Minitalk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-zerisenay%2F42Minitalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-zerisenay%2F42Minitalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-zerisenay%2F42Minitalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-zerisenay%2F42Minitalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon-zerisenay","download_url":"https://codeload.github.com/simon-zerisenay/42Minitalk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647260,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42abudhabi","42school","c","clientservercommunication","cprogramming","ecole42","minitalk","server","signals","sigusr1","sigusr2"],"created_at":"2024-11-15T09:43:14.114Z","updated_at":"2025-10-03T22:56:46.371Z","avatar_url":"https://github.com/simon-zerisenay.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\r\n\t\r\n\u003ch1\u003e 42 Minitalk Project \u003c/h1\u003e\r\n\r\n\u003ca href=\"https://github.com/simon-zerisenay/42Minitalk\"\u003e![42 Badge](https://github.com/mcombeau/mcombeau/blob/main/42_badges/minitalkm.png)\u003c/a\u003e\r\n\r\n\u003c/div\u003e\r\n\u003cbr/\u003e\r\n\u003cp align=\"center\"\u003e\r\n\t\u003cimg alt=\"GitHub code size in bytes\" src=\"https://img.shields.io/github/languages/code-size/simon-zerisenay/42Minitalk?color=lightblue\" /\u003e\r\n\t\u003cimg alt=\"Number of lines of code\" src=\"https://img.shields.io/tokei/lines/github/simon-zerisenay/42Minitalk?color=critical\" /\u003e\r\n\t\u003cimg alt=\"Code language count\" src=\"https://img.shields.io/github/languages/count/simon-zerisenay/42Minitalk?color=yellow\" /\u003e\r\n\t\u003cimg alt=\"GitHub top language\" src=\"https://img.shields.io/github/languages/top/simon-zerisenay/42Minitalk?color=blue\" /\u003e\r\n\t\u003cimg alt=\"GitHub last commit\" src=\"https://img.shields.io/github/last-commit/simon-zerisenay/42Minitalk?color=green\" /\u003e\r\n\u003c/p\u003e\r\n\u003cbr/\u003e  \r\n\u003clabel\u003e\r\n\t\u003ch2\u003e Score \u003c/h2\u003e\t\r\n\t\u003cimg alt=\"100\" style=\"width: 100px;height: 70px\" src=\"https://github.com/simon-zerisenay/simon-zerisenay/blob/main/125.png\"/\u003e\r\n\u003c/label\u003e\r\n\u003ch2\u003eIntroduction\u003c/h2\u003e \r\n\u003cbr/\u003e  \r\nWelcome to the 42 Minitalk project! This project aims to demonstrate your understanding of interprocess communication using signals in C programming. Minitalk is a simple client-server communication system that enables the transmission of text messages between two processes through signal handling.\r\n\r\n\u003ch2\u003eObjective\u003c/h2\u003e \r\nThe primary objective of this project is to implement a client and server program that can effectively communicate with each other using signals. The client program will take a string message as input and send it to the server program, which will receive the message and display it on the standard output.\r\n\r\n\u003ch2\u003eFeatures\u003ch2\u003e    \r\n  \u003ch3\u003eSignal-Based Communication\u003c/h3\u003e \r\nThe Minitalk project leverages signal-based communication for exchanging data between the client and server. Signals provide a lightweight and efficient mechanism for interprocess communication, making them well-suited for this task. The project demonstrates the handling of specific signals, such as SIGUSR1 and SIGUSR2, to transmit information.\r\n \r\n\u003ch3\u003eReliable Message Transmission\u003c/h3\u003e\r\nTo ensure reliable message transmission, the implementation accounts for potential signal losses. The client program employs a bit-by-bit approach to send each character of the message, allowing the server to reconstruct the complete message accurately. Additionally, the server acknowledges successful message reception by sending a specific signal back to the client.\r\n\r\n\u003ch3\u003eASCII Encoding\u003c/h3\u003e \r\nThe Minitalk project utilizes ASCII encoding to represent text messages. ASCII characters are widely supported and can represent various alphanumeric characters, symbols, and control characters. By using ASCII encoding, the project enables the transmission of diverse text-based content.\r\n  \r\n\u003ch3\u003eBonus Feature: Acknowledgement Mechanism\u003c/h3\u003e  \r\nAs a bonus feature, the project includes an acknowledgement mechanism to enhance the communication system. After receiving each message, the server sends a signal back to the client to indicate successful reception. This mechanism provides additional reliability and allows for the implementation of error handling strategies.\r\n\r\n\u003ch3\u003eInstallation and Usage\u003c/h3\u003e\r\nTo use the Minitalk project, follow these steps: \r\n\u003cdiv align=\"center\"\u003e\r\n  \u003cp\u003eClone the repository:\u003cp\u003e  \r\n                                          git clone https://github.com/simon-zerisenay/42Minitalk.git\r\n\u003cbr/\u003e\r\n   \u003cbr\u003e \r\n  Navigate to the project directory: \r\n  \u003cbr/\u003e\r\n   \u003cbr\u003e   \r\n  \u003ci\u003e             cd 42-minitalk \u003c/i\u003e \r\n  \u003cbr/\u003e\r\n   \u003cbr\u003e\r\nCompile the client and server programs: \r\n  \u003cbr/\u003e\r\n   \u003cbr\u003e\r\n  \u003ci\u003emake \u003c/i\u003e\r\n  \u003c/br\u003e\r\n   \u003cbr\u003e\r\nRun the server program in one terminal window: \r\n     \u003cbr\u003e\r\n  ./server\r\n     \u003cbr/\u003e\r\nIn another terminal window, run the client program:\r\n     \u003cbr/\u003e\r\n  ./client [server_pid] [message]\r\n   \u003cbr\u003e\r\n  Replace [server_pid] with the process ID of the server.\r\nReplace [message] with the desired text message to be sent.\r\nHow it Works\r\nThe Minitalk project consists of two main components: the client and the server.\r\n \u003cbr\u003e\r\n   \u003cbr\u003e\r\n  \u003c/div\u003e\r\n  \u003cbr/\u003e\r\n\u003ch2\u003eClient\u003c/h2\u003e\r\n \u003cbr\u003e\r\n   \u003cbr\u003e\r\n  The client program is responsible for sending the text message to the server. It takes the process ID of the server and the message as command-line arguments. The client sends the message to the server by converting each character into its binary representation and transmitting it bit by bit using signals. It handles the signal responses from the server and keeps track of the number of bits received. Once the entire message is transmitted, the client terminates.\r\n\u003cbr\u003e\r\n   \u003cbr\u003e\r\n  \u003ch2\u003eServer\u003c/h2\u003e\r\n  \u003cbr\u003e\r\nThe server program waits for incoming signals from the client. It sets up signal handlers for SIGUSR1 and SIGUSR2 to process the incoming signals. The server reconstructs the message by accumulating the bits received from the client and decoding them back into characters. It displays the received message on the standard output. The server continues to listen for incoming signals indefinitely.\r\n\u003cbr\u003e\r\n  \u003ch2\u003eExample Run\u003c/h2\u003e\r\nTo illustrate the Minitalk project in action, let's consider an example run:\r\n\r\nStart the server program in one terminal window:\r\n  \u003cbr/\u003e\r\n  \u003cbr\u003e\r\n  \u003cdiv align=\"center\"\u003e ./server \u003c/div\u003e\r\n  \u003cbr/\u003e\r\n  \u003cbr\u003e\r\nThe server process identification (PID) will be displayed on the screen.\r\nOpen another terminal window and run the client program: \r\n  \u003cbr/\u003e\r\n  \u003cbr/\u003e\r\n  \u003cdiv align=\"center\"\u003e ./client [server_pid] [message] \u003c/div\u003e\r\n\u003cbr/\u003e\r\n  \u003cbr/\u003e\r\n  Replace [server_pid] with the PID of the server obtained in the previous step.\r\nReplace [message] with the desired text message to be sent.\r\nThe client will transmit the message to the server using signal-based communication.\r\nThe server will receive the message and display it on the standard output.\r\nThe client program will terminate once the message transmission is complete.\r\n  \u003ch1\u003e Conclusion \u003c/h1\u003e\r\nThe 42 Minitalk project provides an immersive learning experience in interprocess communication and signal handling within the context of C programming. By implementing a robust client-server communication system, you will gain valuable insights into signal-based communication, reliable message transmission, and ASCII encoding. Additionally, the bonus feature of an acknowledgement mechanism adds an extra layer of sophistication to the project.\r\n\u003cbr/\u003e\r\n  \u003cbr/\u003e\r\nFor more detailed information and to explore the source code, please refer to the project's documentation and code files. Enjoy delving into the intricacies of interprocess communication through the Minitalk project!\r\n\u003cbr/\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-zerisenay%2F42minitalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon-zerisenay%2F42minitalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-zerisenay%2F42minitalk/lists"}