+
Skip to content

3lswear/minitalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minitalk

Learning Unix IPC by misusing signals!

Usage


clone the repo:

git clone --recursive https://github.com/3lswear/minitalk

build:

cd minitalk && make

launch server:

./server

launch client with server's pid and string to send as arguments:

./client 1337 a_string_to_send

or, to make things easier:

./client $(pidof server) "$(< text.txt)"

Description


The program consists of a client and a server. The former takes a file and sends it to server using user-defined signals SIGUSR1, SIGUSR2. Upon completion the server simply prints out received text.

The communication goes on something like this:

┌───────────┐                    ┌───────────┐
│           │   one bit of data  │           │
│           ├────────────────────►           │
│           │                    │           │
│  client   │  SIGUSR1/SIGUSR2   │  server   │
│           │                    │           │
│           │                    │           │
│           ◄────────────────────┤           │
│           │    confirmation    │           │
└───────────┘                    └───────────┘

The hard part was to make data transfer fast and resistant to latency variations.

About

Send information by encoding it with unix signals

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载