(preferred: u16, bind: IpAddr)
| 2427 | } |
| 2428 | |
| 2429 | fn choose_service_port_for_bind(preferred: u16, bind: IpAddr) -> anyhow::Result<u16> { |
| 2430 | let port = preferred.max(1024); |
| 2431 | if port_available(bind, port) { |
| 2432 | return Ok(port); |
| 2433 | } |
| 2434 | anyhow::bail!("SimDeck service port {port} is already in use") |
| 2435 | } |
| 2436 | |
| 2437 | fn choose_available_service_port_for_bind(preferred: u16, bind: IpAddr) -> anyhow::Result<u16> { |
| 2438 | let start = preferred.max(1024); |
no test coverage detected