-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
105 lines (81 loc) · 3.81 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
██ ██ █████ ██ █████ █████▄
▓███▄ ▄███▒██▓ ██▓██▓ ▒██▓ ██▒██▓ █▌
▓██▀███▀██░██▒ ██▒██▒ ▒██▒ ██░██▒ █▌
▒██ ▀ ▒██░██ ██▒██░ ░██ ██░██ █▌
▒██▒ ░██░▒███▀█▄░██████░▒███▀█▄░█████▓
░ ░ ░░ ▒░ ░░ ░ ▒ ░░ ▒░ ░ ░ ▒ ▒
░ ░ ░ ░ ░ ░ ░
File transfer over TCP/IP on sockets (POSIX)
=================================================
___ _ ___ _ ___ _ ___ _
[(_)] |=| [(_)] |=| [(_)] |=| [(_)] |=|
'-` |_| '-` |_| '-` |_| '-` |_|
/mmm/ / /mmm/ / /mmm/ / /mmm/ /
|____________|____________|____________|
mqlqd clients |
send files to the server |
\ _______
.-------. \_______| _____ |
| -----.-----. server ||_____||
| -----| -----\ running ||_____||
| -----| ----- | mqlqd ||_____||
| -----| ----- | daemon ||_____||
'------| ----- | ||_____||
'-------' ||_____||
listens for incoming connections ||_____||
receives and saves files in a storage | |
directory unique to the client |=======|
CLIENT USAGE
============
Transfer file(s) over TCP/IP to the server running the mqlqd_daemon.
Usage:
mqlqd_client [OPTIONS] [file paths as trailing arguments ...]
-a, --addr arg Server IP address with the mqlqd_daemon.
(default: 127.0.0.1)
-p, --port arg Port number of the daemon on the server.
(default: 42069)
-c, --cat Print file content (cat like utility mode).
-f, --file arg File path of the file to transmit.
-h, --help Show usage help.
-u, --urge 1-7 Log urgency level. (All messages </> Only critical)
DAEMON USAGE
============
Accept file(s) over TCP/IP from the clients running the mqlqd_client.
Usage:
mqlqd_daemon [OPTION...]
-d, --dir arg Path to the storage dir, else default storage under cwd.
(default: ./mqlqd_storage)
-p, --port arg Use port number as identity of the daemon on the server.
(default: 42069)
-h, --help Show usage help.
-u, --urge 1-7 Log urgency level. (All messages </> Only critical)
BUILD
=====
To make clean build
$ ./scripts/build.sh clean
To make cleaner build (for edge cases)
$ ./scripts/build.sh cleaner
Ninja (build system) is optional: change Generator -G Ninja in the above build script.
REQUIREMENTS
============
Platform requirement: Linux, BSD or origin from the UNIX family (POSIX compliant os).
* libc To work with the socket API (socket API support is mandatory for the platform)
3rd party dependencies (fetched automatically with CMake fetch content)
* fmtlib (https://github.com/fmtlib/fmt)
* cxxopts (https://github.com/jarro2783/cxxopts)
Tests require:
* gtest (https://github.com/google/googletest)
RELATED ARTICLES
================
Linux man-pages are crucial for understanding of the sockets API.
The Linux socket API explained (brilliant simple and concise introduction)
https://www.youtube.com/watch?v=XXfdzwEsxFk
A brief intro to TCP/IP and a basic client-server setup in C++ that uses TCP/IP
https://lenngro.github.io/how-to/2021/01/05/Simple-TCPIP-Server-Cpp/
Berkeley BSD and POSIX sockets API (history)
https://en.wikipedia.org/wiki/Berkeley_sockets
OSI model (Open Systems Interconnection model) (history)
https://en.wikipedia.org/wiki/OSI_model
LICENSE
=======
0BSD