pub struct UdpTrackerManager { /* private fields */ }Implementations§
Source§impl UdpTrackerManager
impl UdpTrackerManager
pub async fn new(client: SharedUdpClient) -> Self
pub fn parse_tracker_urls(&mut self, urls: &[String]) -> usize
pub async fn announce( &mut self, info_hash: &[u8; 20], peer_id: &[u8; 20], downloaded: i64, left: i64, uploaded: i64, event: UdpEvent, num_want: i32, ) -> Vec<AnnounceResponse>
pub async fn process_responses(&mut self) -> Vec<AnnounceResponse>
pub fn endpoint_count(&self) -> usize
pub fn get_announce_interval(&self) -> u32
pub fn should_reannounce(&self) -> bool
pub fn collect_all_peers(responses: &[AnnounceResponse]) -> Vec<(String, u16)>
Source§impl UdpTrackerManager
impl UdpTrackerManager
pub async fn from_torrent_meta( meta: &Arc<RwLock<TorrentMeta>>, client: SharedUdpClient, ) -> Option<Self>
Auto Trait Implementations§
impl !RefUnwindSafe for UdpTrackerManager
impl !UnwindSafe for UdpTrackerManager
impl Freeze for UdpTrackerManager
impl Send for UdpTrackerManager
impl Sync for UdpTrackerManager
impl Unpin for UdpTrackerManager
impl UnsafeUnpin for UdpTrackerManager
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more