diff options
| author | Max Audron <audron@cocaine.farm> | 2020-01-22 16:11:38 +0100 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2020-01-22 16:11:38 +0100 |
| commit | 20da110e38ea2390bc0f44136998464fef98aefd (patch) | |
| tree | 0ddfabf9aa862f398c9c4aebfad93bab4fe1a77e /src/main.rs | |
| parent | update (diff) | |
update
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/main.rs b/src/main.rs index d496270..5c34bae 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,8 @@ mod consts; + +#[cfg(features = "client")] mod client; + mod protocol; #[macro_use] @@ -11,10 +14,6 @@ extern crate failure; #[cfg(test)] mod tests; -//use util::Hex; -use protocol::primitive::{String, StringList}; -use protocol::message::{ClientInit}; - use failure::Error; #[tokio::main] @@ -24,21 +23,10 @@ async fn main() -> Result<(), Error> { "localhost", 4242, false, - true, + false, ).await.unwrap(); - let mut features = StringList::new(); - features.push("SynchronizedMarkerLine".to_string()); - features.push("Authenticators".to_string()); - features.push("ExtendedFeatures".to_string()); - let client_init = ClientInit { - client_version:String::from("Rust 0.0.0"), - client_date: String::from("1579009211"), - feature_list: features, - client_features: 0x00008000, - }; - - client.handler().await?; + client.run().await; // client.login("audron", "audron", client_init); Ok(()) |
