Fixes
This commit is contained in:
parent
feb1ec51c8
commit
90a9196a9d
10 changed files with 1124 additions and 52 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -1,6 +1,7 @@
|
|||
#![feature(let_chains)]
|
||||
|
||||
mod client;
|
||||
mod http;
|
||||
mod record;
|
||||
mod server;
|
||||
|
||||
|
|
@ -53,6 +54,9 @@ struct OptPlay {
|
|||
/// Repeat N times
|
||||
#[argp(option, short = 'r', default = "1")]
|
||||
repeat: u32,
|
||||
/// Only play this record
|
||||
#[argp(option)]
|
||||
record: Option<u64>,
|
||||
}
|
||||
|
||||
/// Print records
|
||||
|
|
@ -93,7 +97,13 @@ async fn main() {
|
|||
_ => panic!("TLS mode must be one of none,client,server,both."),
|
||||
};
|
||||
let records = RECORDS.init(record::read_record_file(&opt.record_file));
|
||||
|
||||
if let Some(only_record) = subopt.record {
|
||||
records.retain(|id, _| *id == only_record);
|
||||
}
|
||||
|
||||
let (sync_sender, sync_receiver) = oneshot::channel();
|
||||
console_subscriber::init();
|
||||
let client = tokio::spawn(client::play(
|
||||
records,
|
||||
tls_mode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue