Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
yutiansut committed Dec 2, 2019
1 parent 981e97c commit 1b9abe7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ actix-codec = "0.1.2"

actix-web-actors = "1.0.0"
actix-files = "0.1.1"
awc = "0.2.1"
awc = "0.2.8"
json = "*"
futures = "0.1"
bytes = "0.4"
Expand Down
32 changes: 0 additions & 32 deletions src/qawebsockets/messagesx.rs

This file was deleted.

14 changes: 13 additions & 1 deletion src/qawebsockets/websocketclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use futures::{
};



pub fn wsmain(wsuri:String) {
::std::env::set_var("RUST_LOG", "actix_web=info");
env_logger::init();
Expand Down Expand Up @@ -95,6 +94,12 @@ where
}
}

#[derive(Serialize, Deserialize, Debug)]
struct Peek {
aid: String
}


#[derive(Serialize, Deserialize, Debug)]
struct Broker {
aid: String,
Expand Down Expand Up @@ -128,6 +133,13 @@ where

let u: Broker = serde_json::from_str(&xu).unwrap();
println!("{}", serde_json::to_string(&u).unwrap());
let peek = Peek { aid: "peek_message".to_string()};
println!("{:?}", peek);
let b = serde_json::to_string(&peek).unwrap();
println!("{:?}",b);
self.0.write(Message::Text(b)).unwrap();


}
}

Expand Down

0 comments on commit 1b9abe7

Please sign in to comment.