- Notifications
You must be signed in to change notification settings - Fork0
Assignment completed as part of the IFT3325 course at Université de Montréal.
etiennecollin/ift3325
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
- rust >= 1.82.0
Note
The code was tested usingrustc 1.82.0
.
Run the server:
./server<port_number><prob_frame_drop><prob_bit_flip>
Run the client:
./client<server_address><server_port><file><go_back_n><prob_frame_drop><prob_bit_flip>
Note
If the file sent only contains the stringshutdown
, the server will shutdown.
Note
The probabilities are given as floating point numbers in the range [0, 1]and are independent probabilities.
In this example, the client and server are used. Each frame from the serverhas a 10% probability of being dropped and a 10% probability of suffering abit flip.
cargo run --release -p server 8080 0.1 0.1cargo run --release -p client 127.0.0.1 8080<file_path> 0 0 0
To run the tests, use:
cargotest
For a better test UI and parallel execution of tests, usecargo-nextest
.Install it with:
cargo install cargo-nextest --locked
and run the tests with:
cargo nextest run
The log level may be changed through an environment variable.
RUST_LOG=<log_level>
where<log_level>
is, in increasing order of severity, either:
DEBUG
INFO
WARN
ERROR
By default, the log level used isINFO
.
Use the--profile dev
flag for a debug build, and the--release
flag for a release build:
# Debugcargo run --profile dev -p<target><args># Releasecargo run --release -p<target><args>
<args>
are the args for the executable and<target>
is either:
server
client
Note
The code is available athttps://github.com/etiennecollin/ift3325
About
Assignment completed as part of the IFT3325 course at Université de Montréal.