Skip to main content

socket

Function socket 

Source
pub fn socket(domain: c_int, ty: c_int, protocol: c_int) -> Option<RawFd>
Expand description

socket(domain, type, protocol) — host libc. Returns host fd or None.

Sockets are forced O_NONBLOCK. Curl/c-ares (and the multi interface) expect non-blocking I/O; a blocking recv on a keep-alive TCP socket after the response body is complete hangs the guest forever (clean-exit G3).