Finished the argument parsing in the main function.
This commit is contained in:
@@ -1,4 +1,18 @@
|
||||
|
||||
pub fn start_server(){
|
||||
println!("HI");
|
||||
use ws::listen;
|
||||
|
||||
pub fn run_server(args: Vec<String>){
|
||||
println!("running server!");
|
||||
}
|
||||
|
||||
|
||||
fn ws() {
|
||||
//A WebSocket echo server
|
||||
listen("127.0.0.1:3003", |out| {
|
||||
move |msg| {
|
||||
println!("recieved: {}", msg);
|
||||
out.send(format!("You sent me: {}", msg))
|
||||
}
|
||||
}).unwrap();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user