use std::{ iter::FromIterator, }; use tokio::sync::watch; use ptth_quic::prelude::*; #[tokio::main] async fn main () -> anyhow::Result <()> { tracing_subscriber::fmt::init (); let args = Vec::from_iter (std::env::args_os ()); let (shutdown_tx, shutdown_rx) = watch::channel (false); ctrlc::set_handler (move || { shutdown_tx.send (true).expect ("Couldn't forward Ctrl+C signal"); })?; trace! ("Set Ctrl+C handler"); ptth_quic::executable_end_server::main (&args, Some (shutdown_rx)).await }