Skip to content

1chgro/minitalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minitalk

Overview

Minitalk is a 42 Network project that introduces inter-process communication (IPC) through signals in Unix systems. The goal is to create a communication program consisting of a server and a client. The server receives messages sent by the client and displays them.

Features

  • Communication between client and server using Unix signals (SIGUSR1 and SIGUSR2).
  • Send and display ASCII characters one bit at a time.
  • Handle edge cases such as null strings and invalid PIDs.

Files

  • server.c: Implements the server program that listens for and processes messages from the client.
  • client.c: Implements the client program that encodes and sends messages to the server.
  • Makefile: Automates compilation of the project.

Usage

Compilation

Use the provided Makefile to compile the project:

make

This generates the server and client executables.

Running the Server

Start the server to obtain its Process ID (PID):

./server

The server will output its PID. For example:

Server PID: 12345

Sending a Message

Run the client with the server's PID and the message you want to send:

./client <server_pid> "Your message here"

Example:

./client 12345 "Hello, world!"

The server will display the message upon receiving it.

Requirements

  • Handle errors gracefully, such as invalid PIDs or signal interruptions.
  • The communication should be precise, ensuring all characters are sent and received correctly.

Bonus

  • Support Unicode characters.
  • Add a feature for the client to acknowledge that the message was successfully received.

Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published