Problem statement: It is desired to send any type of file across UDP with low latency or metadata overhead.
This is a simple library that provides high level constructs to manage a sequence of packets streaming over UDP.
This library uses bincode
to assist in the serial/deseralisation of Packet
structs.
These structs contain chunks from input file and also have global metadata about the sequence construction.
cargo test
to run a synthetic test.
Run the example cargo run --example local_file_transfer -- --filepath <FILEPATH>
( This will currently spit the file into the cwd )
To analyze performance use flamegraph
( cargo install flamegraph )
sudo cargo flamegraph --dev --example local_file_transfer -- --filepath <FILEPATH>
docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 -p14268:14268 jaegertracing/all-in-one:latest
Create a trace:
RUST_LOG=trace RUSTFLAGS="--cfg tokio_unstable" cargo run --example local_file_transfer -- --filepath=examples/resources/fox.png