Add some tests.
[crypto_lab1.git] / src / main.rs
index 5f2fdf9..e9e911a 100644 (file)
@@ -12,21 +12,15 @@ mod crypto;
 mod packet;
 mod end_point;
 
-/*
-TODO
-   * Comment stocker les clefs? à quels critères doivent elle répondre?
-   * 
-*/
-
 const PORT: u16 = 4221;
 
 fn print_usage() {
    println!("{} <genkey> | <tests> | ...", os::args()[0]);
 }
 
-fn main() {   
+fn main() {
    let args = os::args();
-   
+
    if args.iter().any(|a| a.as_slice() == "--help" || a.as_slice() == "-h") {
       print_usage();
    } else if args.len() > 1 && args[1].as_slice() == "genkey" {
@@ -36,12 +30,12 @@ fn main() {
       }
    } else {
       println!("Starting server..., Press any key to quit");
-      
+
       match Server::new("::1", PORT) {
          Ok(mut server) => {
             println!("Server started");
-            Client::start_tests("::1", PORT);            
-            io::stdin().read_line().ok().expect("Failed to read line");         
+            Client::start_tests("::1", PORT);
+            io::stdin().read_line().ok().expect("Failed to read line");
             server.close().ok().expect("Failed to close the server");
          },
          Err(e) =>