This commit is contained in:
2022-08-30 11:01:24 +02:00
parent 641bc1b992
commit 09b5403390
3 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
use std::future::Future;
use std::net::TcpListener;
pub fn relay_client(token: &str, port_id: usize, server: &str, listen_address: &str) {
log::info!("({}) Start to listen on {}", port_id, listen_address);
let listener = match TcpListener::bind(&listen_address) {
Ok(l) => l,
Err(e) => {
log::error!("Failed to start to listen on {}!", listen_address);
std::process::exit(3);
}
};
}