Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
yutiansut committed Dec 5, 2019
1 parent 71e7a68 commit 6d7f43f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
25 changes: 19 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,28 @@ fn main() {
client.subscribe_routing();

});
let mut ix = 0;
for mut ix in 0..10000 {
thread::spawn(move || {

println!("xxxx{}",ix);
qawebsocket::wsmain(
"ws:https://101.132.37.31:7988".to_string(),
format!("s0{}", ix), format!("s0{}", ix));
ix +=1;

qawebsocket::wsmain(
"ws:https://101.132.37.31:7988".to_string(),
"s01".to_string(), "s01".to_string());
});
thread::sleep(Duration::from_millis(900));

test_ndarray();
test_datetime();
test_timeseries();
};
qawebsocket::wsmain(
"ws:https://101.132.37.31:7988".to_string(),
format!("sw0{}", ix), format!("sw0{}", ix));
//
//
// test_ndarray();
// test_datetime();
// test_timeseries();

}

Expand Down
7 changes: 3 additions & 4 deletions src/qawebsocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ use futures::{


pub fn wsmain(wsuri:String, user_name:String, password:String) {
::std::env::set_var("RUST_LOG", "actix_web=info");
env_logger::init();

let sys = actix::System::new("ws-example");


Expand All @@ -47,8 +46,8 @@ pub fn wsmain(wsuri:String, user_name:String, password:String) {
let login = ReqLogin {
aid: "req_login".to_string(),
bid: "QUANTAXIS".to_string(),
user_name: "133496".to_string(),
password: "QCHL1234".to_string()};
user_name,
password,};

// if io::stdin().read_line(&mut cmd).is_err() {
// println!("error");
Expand Down

0 comments on commit 6d7f43f

Please sign in to comment.