-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
37 lines (32 loc) · 1.85 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
# Parallel-transfer-file
This is the first version and only implements the basic functions.
SSL is not used, just unencrypted traffic.
Only transfer directories and normal files are supported.
File permission synchronization is not supported.
No signal processing.
send_file.py parameter:
--server: server ip address
--port: The port to listen on or connect to
--file: The file or directory to transfer
--remote_dir: The server store path
--length: Specifies the data size per transfer in bytes
--process_num: The number of processes to start, by default, is the number of native CPU cores
--thread_num: Number of threads per process
--ip_version: The ip protocol version
recv_file_file.py parameter:
--addr: ip address.
--port: The port to listen
--ip_ver: The ip protocol version
examples:
python3 send_file.py --server x.x.x.x --port xxx --file /path/file --remote_dir /remote_dir/ --process_num 21 --length 157286400 --ip_version 6
python3 send_file.py --server x.x.x.x --port xxx --file /path/dir --remote_dir /remote_dir/ --length 1572864
python3 recv_file.py --port xxx --ip_ver 6
Application layer protocol:
+---+---+--------------+--------------------------------------------------- +------+
| c | d | length | data | 0/!0 |
+---+---+--------------+--------------------------------------------------- +------+
| c | f | length | data | 0/!0 |
+---+---+--------------+------------+------------+-------------+----------- +------------------+
| w | f | length | file name | offset | size | data | md5sum(32Bytes) |
+---+---+--------------+------------+------------+-------------+----------- +------------------+
1 1 6 12 12 (Byte) 32