wip
This commit is contained in:
14
tcp_relay_client/src/relay_client.rs
Normal file
14
tcp_relay_client/src/relay_client.rs
Normal 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);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user