} | } | ||||
println!("Sending {}", buffer); | println!("Sending {}", buffer); | ||||
stream.write(buffer.as_bytes()).unwrap(); | stream.write(buffer.as_bytes()).unwrap(); | ||||
println!("Sent {}, awaiting reply...", buffer); | |||||
println!("Sent {}, awaiting reply ...", buffer); | |||||
} | } | ||||
Err(error) => { | Err(error) => { | ||||
println!("error: {error}"); | println!("error: {error}"); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
}, | |||||
} | |||||
Err(e) => { | Err(e) => { | ||||
println!("Failed to connect: {}", e); | println!("Failed to connect: {}", e); | ||||
} | } |