MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / test_close_socket

Function test_close_socket

tests/io/close.rs:14–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13#[test]
14fn test_close_socket() {
15 let socket = std::net::TcpListener::bind("127.0.0.1:0").unwrap();
16 let raw = socket.into_raw_fd();
17 unsafe {
18 rustix::io::close(raw);
19 }
20}
21
22#[cfg(all(feature = "try_close", any(unix, target_os = "wasi")))]
23#[test]

Callers

nothing calls this directly

Calls 3

bindFunction · 0.50
closeFunction · 0.50
into_raw_fdMethod · 0.45

Tested by

no test coverage detected