Open TheRadioGuy opened 4 years ago
I am also having issues but your main is messed up first, you need to unwrap send_data() im fairly certain. Second you are sending the data then going into the recieve loop. Regardless nothing is happening in this main either by running it as a server then running the client:
fn main() {
let mut is_server = false;
if arg_count() > 2 {
println!("Invalid number of arguments max number of arguments allowed is 2");
std::process::exit(0);
}
for flag in get_flags() {
match flag.flag_type {
FlagType::Server => {
is_server = true;
}
_ => {
}
}
}
if is_server {
receive_data();
std::process::exit(0);
}
send_data().unwrap();
}
Hey, I copied UDP example and added in
main
this:And it does nothing