21 lines
496 B
Rust
21 lines
496 B
Rust
use crate::constants::*;
|
|
use std::net::{SocketAddr, ToSocketAddrs};
|
|
use std::time::Duration;
|
|
|
|
pub struct MDNSServiceDiscoveryConfig {
|
|
pub reply_ttl: Duration,
|
|
pub local_service_addr: SocketAddr
|
|
}
|
|
|
|
impl Default for MDNSServiceDiscoveryConfig {
|
|
fn default() -> Self {
|
|
let local_service_addr =
|
|
SocketAddr::from(([127, 0, 0, 1], CONST_INFECTION_PORT));
|
|
|
|
Self {
|
|
reply_ttl: Duration::from_millis(10),
|
|
local_service_addr
|
|
}
|
|
}
|
|
}
|