TCP-based file exchange program
- Downloads can be resumed at any time as long as the file is present in the filesystem
- Each packet is validated (if sent out of order or corrupt - the download will terminate)
- Current
progress
,speed
andETA
are updated every packet and displayed
- having a config file is
not required
as long as command line parameters are provided - config file is read down line by line so if a key is redefined again it'll be overwritten
- lines that don't start with any recognized config
key
are not parsed (can be used for comments) - when running as
host
without an ip argument the host ip will be automatically assigned
Run cargo r host
or cargo r connect
- Rename
config-ex.txt
file toconfig.txt
- Configure values for either a
host
or aclient
setup - Alternatively pass them as command line arguments
Additional arguments:
-ip, --ip=10.0.0.3
-p, --port=5313
-aa, --auto-accept
- file sharing:
share <path>
, the other end should perform aread
- speedtest:
si
- downloading peer,so
- uploading peer - RTT (round trip time):
rtt 1
- any peer,rtt 2
- other peer - close connection (stream close):
shutdown
pub struct FilePacket<'r> {
pub transaction_id: u64,
pub chunk_id: u64,
pub file_bytes: &'r [u8],
}