pub struct LsdHandle { /* private fields */ }Expand description
Handle to the running Local Service Discovery (BEP 14) actor.
Implementations§
Source§impl LsdHandle
impl LsdHandle
Sourcepub async fn start(
listen_port: u16,
enable_ipv6: bool,
) -> Result<(Self, Receiver<(Id20, SocketAddr)>)>
pub async fn start( listen_port: u16, enable_ipv6: bool, ) -> Result<(Self, Receiver<(Id20, SocketAddr)>)>
Start the LSD actor, binding to the multicast port.
§Errors
Returns an std::io::Error if the IPv4 multicast socket cannot be
created, bound, or joined to the LSD multicast group.
Sourcepub async fn announce(&self, info_hashes: Vec<Id20>)
pub async fn announce(&self, info_hashes: Vec<Id20>)
Announce the given info hashes to the local network via LSD multicast.
Sourcepub async fn shutdown_and_wait(&self)
pub async fn shutdown_and_wait(&self)
M173 Lane B (B9): shut down the LSD actor and wait for the multicast UDP socket to be released.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LsdHandle
impl RefUnwindSafe for LsdHandle
impl Send for LsdHandle
impl Sync for LsdHandle
impl Unpin for LsdHandle
impl UnsafeUnpin for LsdHandle
impl UnwindSafe for LsdHandle
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