Crates.io | cjdns |
lib.rs | cjdns |
version | 0.2.0 |
source | src |
created_at | 2017-05-15 00:42:53.081632 |
updated_at | 2017-05-15 02:53:42.240199 |
description | Admin API implementation of cjdns |
homepage | |
repository | https://github.com/kpcyrd/cjdns-rs |
max_upload_size | |
id | 14622 |
size | 18,340 |
Admin API implementation of cjdns.
extern crate cjdns;
use cjdns::structs::Peer;
fn main() {
let sock = cjdns::Socket::udp("127.0.0.1:11234").unwrap();
let x = sock.ping().unwrap();
println!("{:?}", x);
let x = sock.peer_stats().unwrap();
let peers: Vec<Peer> = x.into_iter()
.flat_map(|page| page.peers)
.collect();
for peer in peers {
println!("{:?}", peer);
}
}
LGPLv3