diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-05-09 16:27:54 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2020-05-09 16:27:54 +0200 |
commit | 154546a7b4eb36eb1e78fb814c5fe21c6030c2ee (patch) | |
tree | ace4cfa4dde3dbf809fd84e0db5e395db2e537fd /src/main.rs | |
parent | 41caf6090ca8b24c162946054c48d59387d21200 (diff) | |
download | diplonat-154546a7b4eb36eb1e78fb814c5fe21c6030c2ee.tar.gz diplonat-154546a7b4eb36eb1e78fb814c5fe21c6030c2ee.zip |
Split logic in multiple files!
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 471573b..91074d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,17 +3,17 @@ use std::net::SocketAddrV4; use log::*; -use igd::aio::search_gateway; use igd::PortMappingProtocol; mod diplonat; mod config; +mod gw; #[tokio::main] async fn main() { pretty_env_logger::init(); - let ctx = diplonat::setup().expect("Setup failed"); + let ctx = diplonat::setup().await.expect("Setup failed"); diplonat::listen(); /* let url = format!("http://127.0.0.1:8500/v1/catalog/node/{}", config.consul_node_name); @@ -28,7 +28,6 @@ async fn main() { Ok(g) => g, Err(err) => return println!("Faild to find IGD: {}", err), }; - info!("Gateway: {}", gateway); let service = format!("{}:{}", config.private_ip, 1234); let service: SocketAddrV4 = service.parse().expect("Invalid socket address"); |