Skip to content

Creating client & server programs where the client sends messages to the server using Unix signals. The server decodes them into readable text. It focuses on inter-process communication, signal handling, ensuring reliable message transfer for processes.

Notifications You must be signed in to change notification settings

lai-jia-jing/minitalk

Repository files navigation

minitalk

Minitalk is a program that enables data exchange between a client and a server by leveraging UNIX signals for communication. The core objective of the project is to transmit a string from the client to the server, ensuring that the entire process is carried out using only the SIGUSR1 and SIGUSR2 signals. This requires the client to encode the data into a series of signals and the server to decode and reconstruct the original message, demonstrating effective communication between the two processes.

Final score

125%

Usage

To compile, use make, make all or make bonus.

Mandatory

  • Server-Client Interaction: Upon starting, the server outputs its PID, which the client uses to send a string to the server.
  • UNIX Signal-Based Communication: Relies exclusively on SIGUSR1 and SIGUSR2 signals for transmitting data.
  • Error Resilience: Incorporates strong error-handling measures to ensure stability and prevent crashes.
  • Efficient Memory Management: Ensures proper allocation and cleanup to avoid memory leaks.

Bonus

  • Server Confirmation: The server sends an acknowledgment for each message received.
  • Unicode Support: Handles and processes Unicode characters seamlessly.

Character Encodings

Character encodings represent characters as numerical values, enabling the storage and transmission of text. The most widely used encoding is ASCII, a 7-bit system where each character is assigned a number from 0 to 127. ASCII includes 128 characters, covering letters, digits, punctuation, and control symbols. As a subset of Unicode, ASCII characters are fully compatible with Unicode, which uses a 16-bit encoding system. Unicode extends beyond ASCII, encompassing a much larger range of characters, and is the standard encoding format for most web content today.

Unicode

Unicode is a character encoding standard that includes all the characters in ASCII, making ASCII a subset of Unicode. Unlike ASCII, which is limited to 128 characters, Unicode uses a 16-bit encoding system, allowing it to represent up to 65,536 different characters. This significantly expands the range of characters that can be encoded compared to ASCII.

ASCII

ASCII is a character encoding standard used in electronic communication, originating from telegraph code. It employs 7 bits to represent 128 characters. The first 32 characters are control characters, which are non-printable and used to manage devices like printers and typewriters. The other 96 characters are printable and consist of the English alphabet, numbers, punctuation marks, and various symbols.


About

Creating client & server programs where the client sends messages to the server using Unix signals. The server decodes them into readable text. It focuses on inter-process communication, signal handling, ensuring reliable message transfer for processes.

Topics

Resources

Stars

Watchers

Forks