/// Start listening for connections on this addr (e.g. "0.0.0.0:8585")
///
/// # Errors
/// Can fail if the port is already taken.
Start listening for connections on this addr
Start listening for connections on this addr
pub fn new(bind_addr: &str) -> anyhow::Result<Self> {
        let tcp_listener = TcpListener::bind(bind_addr).context("binding server TCP socket")?;
        tcp_listener
            .set_nonblocking(true)
            .context("TCP set_nonblocking")?;
        Ok(Self {
            next_client_id: 0,
            tcp_listener,
            clients: Default::default(),
            minimum_update_interval: 1.0,
        })
    }
pub fn new ( bind_addr : & str ) -> anyhow :: Result < Self > { let tcp_listener = TcpListener :: bind ( bind_addr ) . context ( " " ) ? ; tcp_listener . set_nonblocking ( true ) . context ( " " ) ? ; Ok ( Self { next_client_id : 0 , tcp_listener , clients : Default :: default ( ) , minimum_update_interval : 1.0 , } ) }
Start listening for connections on this addr (e.g.
Start listening for connections on this addr ( e . g .
bind_addr
&str
errors
Can fail if the port is already taken.
Can fail if the port is already taken .