From 0cb156760552b5c07164f89e7cd22eeacaa54105 Mon Sep 17 00:00:00 2001 From: Masahiko AMANO Date: Sat, 19 Oct 2024 10:52:33 +0300 Subject: [PATCH] chore: add README --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b2f318 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# Aiken + +## Contents + +- [About](#about) +- [How it works](#how-it-works) +- [Usage](#usage) + +## About + +Aiken (_jp._ 合件, _lit._ "common subject") is an utility to share files across your LAN. For example, when you are at work and need to send a file to your colleagues quickly. + +## How it works + +Server wants to share file, client wants to get it. Firstly, they need to find each other in the LAN. The server generates a token needed to get the file. The client transceives a broadcast packet containing this token to find the server. The server checks the token and sends back a response `OK` or `NO` depending on whether token is valid or not. If token is valid, the server sets up a TCP server for the client to send the file. When got `OK` response, the client connects to the server and gets the file. + +NOTE: currently you should have only one server in your LAN at one time, because when a client sends broadcasts a token, he can receive a `NO` response from a wrong server before `OK` response from the right one, rendering himself unable to get the file. + +## Usage + +``` +Usage: + aiken [arguments] + +Options: + -h Print this help and exit + -s Share the file of the specified + -g Get the file by its token + -o Specify output path when getting file + (defaults to current working directory and + the initial file name) + -V Print version info and exit +``` + +--- + +_© Masahiko AMANO aka H1K0, 2024-present_