Struct libmdns::Responder[][src]

pub struct Responder { /* fields omitted */ }

Implementations

Spawn a responder task on an os thread.

Spawn a Responder with the provided tokio Handle.

Example

use libmdns::Responder;

let rt = tokio::runtime::Builder::new_current_thread().build().unwrap();
let handle = rt.handle().clone();
let responder = Responder::spawn(&handle)?;

Spawn a Responder on the default tokio handle.

Register a service to be advertised by the Responder. The service is unregistered on drop.

example

use libmdns::Responder;

let responder = Responder::new()?;
// bind service
let _http_svc = responder.register(
         "_http._tcp".into(),
         "my http server".into(),
         80,
         &["path=/"]
     );

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.