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

Method sock_op

crates/stdlib/src/socket.rs:1080–1091  ·  view source on GitHub ↗
(
            &self,
            vm: &VirtualMachine,
            select: SelectKind,
            f: F,
        )

Source from the content-addressed store, hash-verified

1078 }
1079
1080 fn sock_op<F, R>(
1081 &self,
1082 vm: &VirtualMachine,
1083 select: SelectKind,
1084 f: F,
1085 ) -> Result<R, IoOrPyException>
1086 where
1087 F: FnMut() -> io::Result<R>,
1088 {
1089 let timeout = self.get_timeout().ok();
1090 self.sock_op_timeout_err(vm, select, timeout, f)
1091 }
1092
1093 fn sock_op_timeout_err<F, R>(
1094 &self,

Callers 11

connect_innerMethod · 0.80
_acceptMethod · 0.80
recvMethod · 0.80
recv_intoMethod · 0.80
recvfromMethod · 0.80
recvfrom_intoMethod · 0.80
sendMethod · 0.80
sendtoMethod · 0.80
sendmsgMethod · 0.80
sendmsg_afalgMethod · 0.80
recvmsgMethod · 0.80

Calls 3

okMethod · 0.80
get_timeoutMethod · 0.80
sock_op_timeout_errMethod · 0.80

Tested by

no test coverage detected