diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-10-26 00:17:01 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-10-26 00:17:01 -0700 |
commit | e8e2bb6b41e5e19f8a433dcff597369af2218a92 (patch) | |
tree | dfec4ef65234b00d7037c7bf03eb48f86d6f2962 /src/bin | |
parent | 8e13fc65e944b9741e3f8e0f3d45542d8090a99c (diff) | |
download | geniza-e8e2bb6b41e5e19f8a433dcff597369af2218a92.tar.gz geniza-e8e2bb6b41e5e19f8a433dcff597369af2218a92.zip |
work in progress on network connection
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/geniza-net.rs | 7 | ||||
-rw-r--r-- | src/bin/geniza-register.rs | 3 | ||||
-rw-r--r-- | src/bin/geniza-sleep.rs | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/bin/geniza-net.rs b/src/bin/geniza-net.rs index de97e88..1f369ab 100644 --- a/src/bin/geniza-net.rs +++ b/src/bin/geniza-net.rs @@ -2,6 +2,7 @@ #[macro_use] extern crate error_chain; extern crate clap; +extern crate env_logger; extern crate geniza; // TODO: more careful import @@ -9,6 +10,8 @@ use geniza::*; use clap::{App, SubCommand}; fn run() -> Result<()> { + + env_logger::init().unwrap(); let matches = App::new("geniza-net") .version(env!("CARGO_PKG_VERSION")) @@ -16,7 +19,7 @@ fn run() -> Result<()> { .about("Connects to a peer and exchanges handshake") .arg_from_usage("<host_port> 'peer host:port to connect to'") .arg_from_usage("<dat_key> 'dat key (public key) to register with'")) - .subcommand(SubCommand::with_name("clone") + .subcommand(SubCommand::with_name("receive-all") .about("Connects to a peer, pulls all metadata and content") .arg_from_usage("<host_port> 'peer host:port to connect to'") .arg_from_usage("<dat_key> 'dat key (public key) to register with'")) @@ -44,7 +47,7 @@ fn run() -> Result<()> { false)?; println!("Done!"); }, - ("clone", Some(subm)) => { + ("receive-all", Some(subm)) => { let host_port = subm.value_of("host_port").unwrap(); let dat_key = subm.value_of("dat_key").unwrap(); if dat_key.len() != 32*2 { diff --git a/src/bin/geniza-register.rs b/src/bin/geniza-register.rs index d0f48d8..a328bbc 100644 --- a/src/bin/geniza-register.rs +++ b/src/bin/geniza-register.rs @@ -2,6 +2,7 @@ #[macro_use] extern crate error_chain; extern crate clap; +extern crate env_logger; extern crate geniza; // TODO: more careful import @@ -10,6 +11,8 @@ use std::path::Path; use clap::{App, SubCommand}; fn run() -> Result<()> { + + env_logger::init().unwrap(); let matches = App::new("geniza-register") .version(env!("CARGO_PKG_VERSION")) diff --git a/src/bin/geniza-sleep.rs b/src/bin/geniza-sleep.rs index f8921c7..10fc16b 100644 --- a/src/bin/geniza-sleep.rs +++ b/src/bin/geniza-sleep.rs @@ -3,6 +3,7 @@ extern crate error_chain; #[macro_use] extern crate clap; +extern crate env_logger; extern crate geniza; // TODO: more careful import @@ -11,6 +12,8 @@ use std::path::Path; use clap::{App, SubCommand}; fn run() -> Result<()> { + + env_logger::init().unwrap(); let matches = App::new("geniza-sleep") .version(env!("CARGO_PKG_VERSION")) |