mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-22 14:21:33 +00:00
protocols/mdns: Make libp2p-mdns socket agnostic (#1699)
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user