pub fn search(&self, info_hash: InfoHash, announce: bool) -> SearchStream {
        let (tx, rx) = mpsc::unbounded_channel();

        if self
            .send
            .send(OneshotTask::StartLookup(StartLookup {
                info_hash,
                announce,
                tx,
            }))
            .is_err()
        {
            log::error!("failed to start search - DhtHandler has shut down");
        }

        SearchStream(rx)
    }
/// Perform a search for the given InfoHash with an optional announce on the closest nodes.
///
///
/// Announcing will place your contact information in the DHT so others performing lookups
/// for the InfoHash will be able to find your contact information and initiate a handshake.
///
/// If the initial bootstrap has not finished, the search will be queued and executed once
/// the bootstrap has completed.
Perform a search for the given InfoHash with an optional announce on the closest nodes.
Announcing will place your contact information in the DHT so others performing lookups
for the InfoHash will be able to find your contact information and initiate a handshake.

If the initial bootstrap has not finished, the search will be queued and executed once
the bootstrap has completed.
Perform a search for the given InfoHash with an optional announce on the closest nodes . Announcing will place your contact information in the DHT so others performing lookups for the InfoHash will be able to find your contact information and initiate a handshake . If the initial bootstrap has not finished the search will be queued and executed once the bootstrap has completed .
pub fn search(&self, info_hash: InfoHash, announce: bool) -> SearchStream {
        let (tx, rx) = mpsc::unbounded_channel();
        if self
            .send
            .send(OneshotTask::StartLookup(StartLookup {
                info_hash,
                announce,
                tx,
            }))
            .is_err()
        {
            log::error!("failed to start search - DhtHandler has shut down");
        }
        SearchStream(rx)
    }
pub fn search ( & self , info_hash : InfoHash , announce : bool ) -> SearchStream { let ( tx , rx ) = mpsc :: unbounded_channel ( ) ; if self . send . send ( OneshotTask :: StartLookup ( StartLookup { info_hash , announce , tx , } ) ) . is_err ( ) { log :: error ! ( " " ) ; } SearchStream ( rx ) }
Perform a search for the given InfoHash with an optional announce on the closest nodes.
Perform a search for the given InfoHash with an optional announce on the closest nodes .
&self
info_hash
InfoHash
announce
bool
&self
info_hash
InfoHash
announce
bool