diff options
author | tom barrett <spalf0@gmail.com> | 2018-04-12 04:33:23 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2018-04-12 04:33:23 -0500 |
commit | 573ba69d810914c153a578747414b3d631e61bbc (patch) | |
tree | 4ce164db9d28ede9778d75ddb4f6922ea1dc1a91 /src/client/dashboard.rs | |
parent | ab797e7f30e5e8913faf73516346129b9a620550 (diff) |
completely restructured code and fixed navigation bug
Diffstat (limited to 'src/client/dashboard.rs')
-rw-r--r-- | src/client/dashboard.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/client/dashboard.rs b/src/client/dashboard.rs new file mode 100644 index 0000000..3776223 --- /dev/null +++ b/src/client/dashboard.rs @@ -0,0 +1,16 @@ +extern crate serde_json; + +use std::io::BufRead; +use std::io::BufReader; +use std::net::TcpStream; + +use ship::Ship; + +pub fn client_dashboard(mut buff_r : BufReader<TcpStream>) { + loop { + let mut recv = String::new(); + buff_r.read_line(&mut recv).unwrap(); + let ship : Ship = serde_json::from_str(&recv).unwrap(); + println!("{:?}", ship); + } +} |