Skip to content

This C-based client-server project showcases inter-process communication using signals. The server decodes and prints messages received from the client, demonstrating a lightweight communication paradigm. The client sends messages through signal-encoded bits to the server.

License

Notifications You must be signed in to change notification settings

kbly538/minitalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minitalk

A bit better than smoke

GitHub code size in bytes Number of lines of code GitHub top language GitHub last commit


This is a simple client-server project demonstrating inter-process communication using signals in C. The server and client communicate by sending signals to each other to encode and decode messages.

Server

Key Points:

  • Signal Handling Function (handlemessage):
    • Accumulates bits received from the client.
    • Decodes bits into characters and prints the characters when a complete character is received.
    • Sends acknowledgment signals back to the client.

Client

Key Points:

  • Command-Line Argument Verification (args_verifier):

    • Verifies the correctness of command-line arguments.
    • Checks for a valid PID and the presence of a message. Abcense of a valid pid means there is an ongoing job.
  • Sending Message Bits to Server (send_message):

    • Sends bits of the message to the server using signals.
    • Moves to the next character when all bits are sent.
  • Acknowledgment Signal Handling (acknowledge):

    • Handles acknowledgment signals from the server.
    • Exits the client when a complete message is acknowledged.

Example:

  1. Run the server:

    make
    ./server
  2. In another terminal run the client with server PID which will be printed in the server's terminal:

    ./client [server_PID] "Hello, Server!"

About

This C-based client-server project showcases inter-process communication using signals. The server decodes and prints messages received from the client, demonstrating a lightweight communication paradigm. The client sends messages through signal-encoded bits to the server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published