rust-mjpeg-proxy/src/main.rs

17 lines
389 B
Rust

use futures::prelude::future::FutureExt;
mod app;
mod client;
mod server;
#[tokio::main(flavor = "current_thread")]
async fn main() {
let app = app::App::new();
let c = tokio::spawn(client::run(app.clone()));
let s = tokio::spawn(server::run(app));
futures::select! {
_ = c.fuse() => panic!("client exit"),
_ = s.fuse() => panic!("server exit"),
};
}