Jelajahi Sumber

Switch to libmdns for discovery

Sasha Hilton 5 tahun lalu
induk
melakukan
d91bf573a4
3 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 2 2
      connect/Cargo.toml
  2. 3 3
      connect/src/discovery.rs
  3. 1 1
      connect/src/lib.rs

+ 2 - 2
connect/Cargo.toml

@@ -29,8 +29,8 @@ aes-ctr = "0.3"
 block-modes = "0.3"
 
 dns-sd = { version = "0.1.3", optional = true }
-mdns = { git = "https://github.com/plietar/rust-mdns", optional = true }
+libmdns = { version = "0.2", optional = true }
 
 [features]
-default = ["mdns"]
+default = ["libmdns"]
 with-dns-sd = ["dns-sd"]

+ 3 - 3
connect/src/discovery.rs

@@ -13,7 +13,7 @@ use hyper::{self, Get, Post, StatusCode};
 use dns_sd::DNSService;
 
 #[cfg(not(feature = "with-dns-sd"))]
-use mdns;
+use libmdns;
 
 use num_bigint::BigUint;
 use rand;
@@ -218,7 +218,7 @@ pub struct DiscoveryStream {
 #[cfg(not(feature = "with-dns-sd"))]
 pub struct DiscoveryStream {
     credentials: mpsc::UnboundedReceiver<Credentials>,
-    _svc: mdns::Service,
+    _svc: libmdns::Service,
 }
 
 pub fn discovery(
@@ -263,7 +263,7 @@ pub fn discovery(
     ).unwrap();
 
     #[cfg(not(feature = "with-dns-sd"))]
-    let responder = mdns::Responder::spawn(&handle)?;
+    let responder = libmdns::Responder::spawn(&handle)?;
 
     #[cfg(not(feature = "with-dns-sd"))]
     let svc = responder.register(

+ 1 - 1
connect/src/lib.rs

@@ -24,7 +24,7 @@ extern crate block_modes;
 extern crate dns_sd;
 
 #[cfg(not(feature = "with-dns-sd"))]
-extern crate mdns;
+extern crate libmdns;
 
 extern crate librespot_core;
 extern crate librespot_playback as playback;