From e540e58161f1d6aa3b0577a0c9382c418c146130 Mon Sep 17 00:00:00 2001 From: CodeSteak Date: Wed, 5 Jun 2019 19:32:23 +0200 Subject: [PATCH] forgot the checkin main, protocol/mod. Sry!! --- server/texture-sync-server/src/main.rs | 4 ++++ server/texture-sync-server/src/protocol/mod.rs | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/server/texture-sync-server/src/main.rs b/server/texture-sync-server/src/main.rs index f6711bc..fbd4044 100644 --- a/server/texture-sync-server/src/main.rs +++ b/server/texture-sync-server/src/main.rs @@ -35,6 +35,10 @@ fn main() -> std::io::Result<()> { network_conf.listen_addr, network_conf.port ); + match self::protocol::start_autoconnect_server_async(&network_conf) { + Ok(_) => println!("Started Autoconnect Server"), + Err(e) => println!("Starting Autoconnect Server failed: {:?}", e) + } self::protocol::listen_forever(server_state, &network_conf)?; Ok(()) diff --git a/server/texture-sync-server/src/protocol/mod.rs b/server/texture-sync-server/src/protocol/mod.rs index b8c3f34..3f6c768 100644 --- a/server/texture-sync-server/src/protocol/mod.rs +++ b/server/texture-sync-server/src/protocol/mod.rs @@ -1,6 +1,9 @@ mod implementation; - pub use self::implementation::*; + +mod autoconnect; +pub use self::autoconnect::start_autoconnect_server_async; + use std::fmt::Display; use crate::model::*; @@ -53,6 +56,7 @@ pub struct ProtocolConfig { pub read_timeout_s: u64, pub write_timeout_s: u64, pub listen_addr: String, + pub autoconnect_multicastv6_addr : String } impl ProtocolConfig { @@ -68,6 +72,7 @@ impl Default for ProtocolConfig { read_timeout_s: 60, write_timeout_s: 75, listen_addr: "::".to_owned(), + autoconnect_multicastv6_addr: "ff02::dd42:c0fe".to_owned(), } } }