read from std in
This commit is contained in:
parent
9a1997ad55
commit
a6c03b9857
@ -7,4 +7,17 @@ fn main() {
|
||||
} else {
|
||||
println!("Couldn't connect to server...");
|
||||
}
|
||||
|
||||
loop {
|
||||
let mut buffer = String::new();
|
||||
match std::io::stdin().read_line(&mut buffer){
|
||||
Ok(_n) => {
|
||||
println!("{}", buffer);
|
||||
}
|
||||
Err(_error) =>{
|
||||
println!("Fehlerhafte Eingabe!");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // the stream is closed here
|
Loading…
x
Reference in New Issue
Block a user