(&self)
| 407 | } |
| 408 | |
| 409 | pub fn compute_preopen_sockets(&self) -> Result<Vec<TcpListener>> { |
| 410 | let mut listeners = vec![]; |
| 411 | |
| 412 | for address in &self.common.wasi.tcplisten { |
| 413 | let stdlistener = std::net::TcpListener::bind(address) |
| 414 | .with_context(|| format!("failed to bind to address '{address}'"))?; |
| 415 | |
| 416 | let _ = stdlistener.set_nonblocking(true)?; |
| 417 | |
| 418 | listeners.push(stdlistener) |
| 419 | } |
| 420 | Ok(listeners) |
| 421 | } |
| 422 | |
| 423 | pub fn validate_p3_option(&self) -> Result<()> { |
| 424 | let p3 = self.common.wasi.p3.unwrap_or(P3_DEFAULT); |
no test coverage detected