pub struct UdpDiscovery { /* private fields */ }
Implementations§
source§impl UdpDiscovery
impl UdpDiscovery
sourcepub async fn new(socket: SocketAddr) -> Result<Self>
pub async fn new(socket: SocketAddr) -> Result<Self>
Create a new UDP discovery service.
sourcepub async fn query_dht(
&self,
dht: Dht,
args: Query
) -> Result<impl Stream<Item = SignedAnnounce>>
pub async fn query_dht( &self, dht: Dht, args: Query ) -> Result<impl Stream<Item = SignedAnnounce>>
Query the mainline DHT for trackers for the given content, then query each tracker for peers.
sourcepub async fn add_tracker(&self, tracker: SocketAddr) -> Result<()>
pub async fn add_tracker(&self, tracker: SocketAddr) -> Result<()>
Manually add a tracker to the list of trackers to query.
sourcepub async fn remove_tracker(&self, tracker: SocketAddr) -> Result<()>
pub async fn remove_tracker(&self, tracker: SocketAddr) -> Result<()>
Manually remove a tracker from the list of trackers to query.
pub async fn query(&self, query: Query) -> Result<Receiver<SignedAnnounce>>
pub async fn announce_once(&self, announce: SignedAnnounce) -> Result<()>
pub async fn announce(&self, announce: SignedAnnounce) -> Result<()>
Trait Implementations§
source§impl Clone for UdpDiscovery
impl Clone for UdpDiscovery
source§fn clone(&self) -> UdpDiscovery
fn clone(&self) -> UdpDiscovery
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for UdpDiscovery
impl RefUnwindSafe for UdpDiscovery
impl Send for UdpDiscovery
impl Sync for UdpDiscovery
impl Unpin for UdpDiscovery
impl UnwindSafe for UdpDiscovery
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more