pub fn start_local_server() -> SocketAddr {
    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
    let addr = listener.local_addr().unwrap();

    thread::Builder::new()
        .name("Plantex Local Server".to_string())
        .spawn(move || {
            start_server(listener).unwrap();
        })
        .unwrap();

    addr
}
/// Starts a server in a different thread, returns the address to connect to.
Starts a server in a different thread, returns the address to connect to.
Starts a server in a different thread returns the address to connect to .
pub fn start_local_server() -> SocketAddr {
    let listener = TcpListener::bind("127.0.0.1:0").unwrap();
    let addr = listener.local_addr().unwrap();
    thread::Builder::new()
        .name("Plantex Local Server".to_string())
        .spawn(move || {
            start_server(listener).unwrap();
        })
        .unwrap();
    addr
}
pub fn start_local_server ( ) -> SocketAddr { let listener = TcpListener :: bind ( " " ) . unwrap ( ) ; let addr = listener . local_addr ( ) . unwrap ( ) ; thread :: Builder :: new ( ) . name ( " " . to_string ( ) ) . spawn ( move | | { start_server ( listener ) . unwrap ( ) ; } ) . unwrap ( ) ; addr }
Starts a server in a different thread, returns the address to connect to.
Starts a server in a different thread returns the address to connect to .