summaryrefslogtreecommitdiff
path: root/src/client/dashboard.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/dashboard.rs')
-rw-r--r--src/client/dashboard.rs16
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);
+ }
+}