{"id":28278737,"url":"https://github.com/mbdanielcrespo/minitalk","last_synced_at":"2025-09-10T03:41:19.671Z","repository":{"id":199790527,"uuid":"703037365","full_name":"mbdanielcrespo/Minitalk","owner":"mbdanielcrespo","description":" Inter-process communication (IPC) using UNIX signals project. It involves creating a client-server system where the client sends messages to the server by encoding characters bit-by-bit using SIGUSR1 and SIGUSR2 signals. ","archived":false,"fork":false,"pushed_at":"2025-04-17T10:54:43.000Z","size":242,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T08:19:01.821Z","etag":null,"topics":["bitwise-operators","getpid","ipc","kill","pause","signal-processing","sigusr1","sigusr2","unix"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbdanielcrespo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2023-10-10T13:29:23.000Z","updated_at":"2025-04-17T10:57:27.000Z","dependencies_parsed_at":"2025-04-17T11:51:38.636Z","dependency_job_id":"8eefc755-86ac-40ca-9947-d5de6c01c356","html_url":"https://github.com/mbdanielcrespo/Minitalk","commit_stats":null,"previous_names":["mbdanielcrespo/ft_minitalk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mbdanielcrespo/Minitalk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbdanielcrespo%2FMinitalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbdanielcrespo%2FMinitalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbdanielcrespo%2FMinitalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbdanielcrespo%2FMinitalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbdanielcrespo","download_url":"https://codeload.github.com/mbdanielcrespo/Minitalk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbdanielcrespo%2FMinitalk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274407958,"owners_count":25279388,"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","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bitwise-operators","getpid","ipc","kill","pause","signal-processing","sigusr1","sigusr2","unix"],"created_at":"2025-05-21T08:16:41.478Z","updated_at":"2025-09-10T03:41:19.662Z","avatar_url":"https://github.com/mbdanielcrespo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📡 minitalk\n\n![42 Badge](https://img.shields.io/badge/42-minitalk-brightgreen)\n![Score](https://img.shields.io/badge/Score-80%2F100-success)\n![Language](https://img.shields.io/badge/Language-C-blue)\n![Status](https://img.shields.io/badge/Status-Completed-success)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/byaliego/42-project-badges/main/badges/minitalke.png\" alt=\"minitalk Badge\" width=\"150\" height=\"150\"\u003e\n\u003c/p\u003e\n\n## 📝 Introduction\n\n**minitalk** is a 42 School project focused on creating a small data exchange program using UNIX signals. The project consists of a client and server that communicate using only SIGUSR1 and SIGUSR2 signals.\n\n\u003e \"A simple but powerful implementation of inter-process communication using signals.\"\n\nThe goal is to transmit any string from a client program to a server program using only UNIX signals as the communication method.\n\n## 🎯 Project Objectives\n\n- Implement a communication protocol using only UNIX signals\n- Create a client that can send messages to a server\n- Create a server that can receive and display messages\n- Handle the transmission of strings of any length\n- Implement proper error handling and signal management\n- Learn about processes, signals, and bitwise operations\n\n## 🧩 Project Structure\n\nThe project consists of three main components:\n\n```\nminitalk/\n├── inc/\n│   └── minitalk.h  # Header file with prototypes and includes\n├── src/\n│   ├── client.c    # Client implementation\n│   └── server.c    # Server implementation\n└── Makefile        # Compilation instructions\n```\n\n## 🛠️ Implementation Details\n\n### **minitalk.h**\nThe header file includes:\n- Standard library includes\n- Custom function prototypes\n- Wait time definition for signal transmission\n- Utility function declarations\n\n### **client.c**\nThe client program sends messages to the server:\n\n| Function | Description |\n|----------|-------------|\n| **pid_error** | Validates command line arguments and PID format |\n| **send_ch_by_bit** | Sends a single character by breaking it into 8 bits |\n| **send_len_by_bit** | Sends string length as 32 bits to prepare the server |\n| **main** | Parses arguments and orchestrates the message transmission |\n\n### **server.c**\nThe server program receives and displays messages from clients:\n\n| Function | Description |\n|----------|-------------|\n| **recive_len** | Reconstructs the length of the incoming message from bits |\n| **recive_str** | Reconstructs characters from bits and builds the final string |\n| **recive_client_data** | Signal handler that processes incoming signals |\n| **main** | Displays PID, sets up signal handlers, and waits for client connections |\n\n## 💡 Communication Protocol\n\n1. **Connection Establishment**:\n   - Server starts and displays its PID\n   - Client uses the server's PID to target signal transmission\n\n2. **Message Transmission**:\n   - Client first sends the string length (32 bits) to the server\n   - Server allocates memory based on the received length\n   - Client sends each character of the string (8 bits per character)\n   - Server reconstructs each character and builds the complete message\n\n3. **Bit Encoding**:\n   - SIGUSR1 represents bit value 1\n   - SIGUSR2 represents bit value 0\n   - Bits are sent sequentially with a delay between signals\n\n## 🔍 Key Features\n\n- Binary data transmission using only two signals\n- Support for messages of any length\n- Error handling for invalid PIDs\n- Memory management for received strings\n- Bitwise operations for encoding/decoding messages\n\n## 🧠 Skills Developed\n\n- Process management and inter-process communication\n- Signal handling in UNIX systems\n- Bitwise operations and binary data manipulation\n- Memory management\n- Protocol design and implementation\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \n  ### 📊 Project Stats\n  \n  | Metric | Value |\n  |--------|-------|\n  | Final Score | 80/100 |\n  | Lines of Code | ~150 |\n  | Signal Types | 2 (SIGUSR1, SIGUSR2) |\n  \n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/C-00599C?style=for-the-badge\u0026logo=c\u0026logoColor=white\" alt=\"C\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/42-000000?style=for-the-badge\u0026logo=42\u0026logoColor=white\" alt=\"42\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbdanielcrespo%2Fminitalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbdanielcrespo%2Fminitalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbdanielcrespo%2Fminitalk/lists"}