We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SO_PASSCRED
1 parent b01ce2c commit 31e6e38Copy full SHA for 31e6e38
library/std/src/sys/unix/net.rs
@@ -341,10 +341,12 @@ impl Socket {
341
Ok(raw != 0)
342
}
343
344
+ #[cfg(any(target_os = "android", target_os = "emscripten", target_os = "linux",))]
345
pub fn set_passcred(&self, passcred: bool) -> io::Result<()> {
346
setsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED, passcred as libc::c_int)
347
348
349
350
pub fn passcred(&self) -> io::Result<bool> {
351
let passcred: libc::c_int = getsockopt(self, libc::SOL_SOCKET, libc::SO_PASSCRED)?;
352
Ok(passcred != 0)
0 commit comments