Struct service_discovery::ServiceDiscovery [] [src]

pub struct ServiceDiscovery<Reply: 'static + Encodable + Decodable + Send + Clone> { /* fields omitted */ }

ServiceDiscovery is a RAII API for the purposes of discovering peers on the local network. To stop the process of discovery completely, it is sufficient to drop the instance of this struct.

Methods

impl<Reply: 'static + Encodable + Decodable + Send + Clone> ServiceDiscovery<Reply>
[src]

Obtain a new RAII instance of ServiceDiscovery. By default listening to peers searching for us is disabled.

Obtain a new RAII instance of ServiceDiscovery. By default listening to peers searching for us is disabled. This function is similar to new except that it takes a callback which generates replies on demand. This is useful if the reply you need to send might change throughout the lifetime of the ServiceDiscovery.

Register a new observer to be notified whenever we successfully find peers by interrogating the network. Return value indicates acknowledgement of the request.

Enable or disable listening and responding to peers searching for us. This will correspondingly allow or disallow others from finding us by interrogating the network. Return value indicates acknowledgement of the request.

Interrogate the network to find peers. Return value indicates acknowledgement of the request.

Trait Implementations

impl<Reply: 'static + Encodable + Decodable + Send + Clone> Drop for ServiceDiscovery<Reply>
[src]

A method called when the value goes out of scope. Read more