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

Function closesocket

crates/stdlib/src/multiprocessing.rs:374–381  ·  view source on GitHub ↗
(socket: usize, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

372
373 #[pyfunction]
374 fn closesocket(socket: usize, vm: &VirtualMachine) -> PyResult<()> {
375 let res = unsafe { WinSock::closesocket(socket as SOCKET) };
376 if res != 0 {
377 Err(vm.new_last_os_error())
378 } else {
379 Ok(())
380 }
381 }
382
383 #[pyfunction]
384 fn recv(socket: usize, size: usize, vm: &VirtualMachine) -> PyResult<Vec<u8>> {

Callers 1

Calls 2

new_last_os_errorMethod · 0.80
ErrClass · 0.50

Tested by

no test coverage detected