summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/client.rs3
-rw-r--r--src/bin/server.rs12
2 files changed, 13 insertions, 2 deletions
diff --git a/src/bin/client.rs b/src/bin/client.rs
index 6f4a8fc..2e8dd45 100644
--- a/src/bin/client.rs
+++ b/src/bin/client.rs
@@ -6,6 +6,7 @@ use std::net::TcpStream;
extern crate space;
use space::dashboard::Dashboard;
use space::engines::Engines;
+use space::navigation::Navigation;
use space::module::{Module, from_primitive};
@@ -46,6 +47,6 @@ fn main() {
match module {
Module::Dashboard => Dashboard(buff_r),
Module::Engines => Engines(stream),
- _ => (),
+ Module::Navigation => Navigation(stream, buff_r),
}
}
diff --git a/src/bin/server.rs b/src/bin/server.rs
index d2923d8..e042855 100644
--- a/src/bin/server.rs
+++ b/src/bin/server.rs
@@ -4,13 +4,23 @@ use std::net::TcpListener;
extern crate space;
use space::mass::Mass;
+use space::astroid::Astroid;
use space::connection::Connection;
+
+fn populate() -> Vec<Box<Mass>> {
+ let mut masses : Vec<Box<Mass>> = Vec::new();
+
+ masses.push(Box::new(Astroid::new("cZfAJ", (10, -5, 4))));
+
+ masses
+}
+
fn main() {
let listener = TcpListener::bind("localhost:6000").unwrap();
listener.set_nonblocking(true).unwrap();
- let mut masses : Vec<Box<Mass>>= Vec::new();
+ let mut masses = populate();
let mut connections = Vec::new();
for stream in listener.incoming() {