Skip to content

kpcyrd/cjdns-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cjdns-rs Build Status Crates.io

Admin API implementation of cjdns.

Getting started

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);
    }
}

License

LGPLv3

About

Admin API implementation of cjdns

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages