MCPcopy Index your code
hub / github.com/RustPython/RustPython / close

Method close

crates/stdlib/src/socket.rs:2171–2177  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

2169
2170 #[pymethod]
2171 fn close(&self) -> io::Result<()> {
2172 let sock = self.sock.write().take();
2173 if let Some(sock) = sock {
2174 close_inner(into_sock_fileno(sock))?;
2175 }
2176 Ok(())
2177 }
2178
2179 #[pymethod]
2180 #[inline]

Callers 1

delMethod · 0.45

Calls 4

close_innerFunction · 0.85
into_sock_filenoFunction · 0.85
takeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected