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

Method socket_needs

crates/stdlib/src/openssl.rs:2331–2343  ·  view source on GitHub ↗
(
            &self,
            err: &ssl::Error,
            deadline: &SocketDeadline,
        )

Source from the content-addressed store, hash-verified

2329 }
2330
2331 fn socket_needs(
2332 &self,
2333 err: &ssl::Error,
2334 deadline: &SocketDeadline,
2335 ) -> (Option<SslNeeds>, SelectRet) {
2336 let needs = match err.code() {
2337 ssl::ErrorCode::WANT_READ => Some(SslNeeds::Read),
2338 ssl::ErrorCode::WANT_WRITE => Some(SslNeeds::Write),
2339 _ => None,
2340 };
2341 let state = needs.map_or(SelectRet::Ok, |needs| self.select(needs, deadline));
2342 (needs, state)
2343 }
2344 }
2345
2346 fn socket_closed_error(vm: &VirtualMachine) -> PyBaseExceptionRef {

Callers 3

do_handshakeMethod · 0.80
writeMethod · 0.80
readMethod · 0.80

Calls 3

codeMethod · 0.80
SomeClass · 0.50
selectMethod · 0.45

Tested by

no test coverage detected