phrohdoh / arini-discovery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arini-discovery

A pure-rust implementation of the ARDiscovery protocol

LICENSE

MIT

Status

Development of this project is on hold but you are more than welcome to contribute!

Usage

extern crate arini_discovery;
extern crate mdns;

use arini_discovery::ServiceType;
use std::time::Duration;

fn main() {
    let bebop = ServiceType::Bebop2;
    let discover_service_name = bebop.get_wifi_service_type();
    let search_duration = Some(Duration::from_secs(5));

    mdns::discover(discover_service_name, search_duration, |response| {
        println!("{:?}", response);
    }).expect(&format!("Failed to discover {}", discover_service_name));
}

Planned Usage

extern crate arini_discovery;
use arini_discovery::ServiceType;
use std::time::Duration;

fn main() {
    let search_duration = Some(Duration::from_secs(5));
    let discoveries = arini_discovery::discover(ServiceType::Bebop2, search_duration);

    for discovery in discoveries {
        println!("{:#?}", discovery);
    }
}

Supporting this project

If you would like to financially support this project please do the following:

Other

This library is not currently functional but, hopefully with the help of the Parrot developers, it will reach a useable state soon!

About

License:MIT License


Languages

Language:Rust 100.0%