fn connect(name: &str) -> TcpStream {
    match say_hello(name.to_string()) {
        Ok(s) => s,
        Err(e) => {
            println!("Failed to connect: {}", e);
            exit(1);
        }
    }
}
// function to try to connect to the server and exit if unsuccessful
function to try to connect to the server and exit if unsuccessful
function to try to connect to the server and exit if unsuccessful
fn connect(name: &str) -> TcpStream {
    match say_hello(name.to_string()) {
        Ok(s) => s,
        Err(e) => {
            println!("Failed to connect: {}", e);
            exit(1);
        }
    }
}
fn connect ( name : & str ) -> TcpStream { match say_hello ( name . to_string ( ) ) { Ok ( s ) => s , Err ( e ) => { println ! ( " " e ) ; exit ( 1 ) ; } } }
function to try to connect to the server and exit if unsuccessful
function to try to connect to the server and exit if unsuccessful
name
&str
name
&str