1
0
mirror of https://github.com/fluencelabs/rust-libp2p synced 2025-06-22 14:21:33 +00:00

protocols/mdns: Make libp2p-mdns socket agnostic ()

Allow libp2p-mdns to use either async-std or tokio to drive required UDP
socket.

Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
This commit is contained in:
Max Inden
2020-08-18 14:51:03 +02:00
committed by GitHub
parent b4ad2d6297
commit cbdbf656c0
7 changed files with 370 additions and 302 deletions

@ -35,8 +35,12 @@ const SERVICE_NAME: &[u8] = b"_p2p._udp.local";
/// Hardcoded name of the service used for DNS-SD.
const META_QUERY_SERVICE: &[u8] = b"_services._dns-sd._udp.local";
pub use self::behaviour::{Mdns, MdnsEvent};
pub use self::service::MdnsService;
#[cfg(feature = "async-std")]
pub use self::{behaviour::Mdns, service::MdnsService};
#[cfg(feature = "tokio")]
pub use self::{behaviour::TokioMdns, service::TokioMdnsService};
pub use self::behaviour::MdnsEvent;
mod behaviour;
mod dns;