Crate cjdns [−] [src]
Admin API implementation of cjdns
Example
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); } }
Reexports
pub extern crate bencode; |
pub use structs::decode; |
Modules
net |
Implementation of the udp socket |
structs |
Definition of various message types |
Structs
ApiError | |
Socket |
The socket that is used to talk to the cjdroute api |
Enums
Error |