You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/socket.rs
+24Lines changed: 24 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -992,6 +992,30 @@ impl Socket {
992
992
}
993
993
}
994
994
995
+
/// Sets `SO_PEERCRED` to null on the socket.
996
+
///
997
+
/// This is a Cygwin extension.
998
+
///
999
+
/// Normally the Unix domain sockets of Cygwin are implemented by TCP sockets,
1000
+
/// so it performs a handshake on `connect` and `accept` to verify the remote
1001
+
/// connection and exchange peer cred info. At the time of writing, this
1002
+
/// means that `connect` on a Unix domain socket will block until the server
1003
+
/// calls `accept` on Cygwin. This behavior is inconsistent with most other
1004
+
/// platforms, and this option can be used to disable that.
1005
+
///
1006
+
/// See also: the [mailing list](https://inbox.sourceware.org/cygwin/TYCPR01MB10926FF8926CA63704867ADC8F8AA2@TYCPR01MB10926.jpnprd01.prod.outlook.com/)
1007
+
#[cfg(any(doc, target_os = "cygwin"))]
1008
+
pubfnset_no_peercred(&self) -> io::Result<()>{
1009
+
#[cfg(target_os = "cygwin")]
1010
+
{
1011
+
self._set_no_peercred()
1012
+
}
1013
+
#[cfg(not(target_os = "cygwin"))]
1014
+
{
1015
+
unimplemented!()
1016
+
}
1017
+
}
1018
+
995
1019
/// Get value for the `SO_RCVBUF` option on this socket.
996
1020
///
997
1021
/// For more information about this option, see [`set_recv_buffer_size`].
Copy file name to clipboardExpand all lines: src/sys/unix.rs
+10-29Lines changed: 10 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -1501,35 +1501,16 @@ impl crate::Socket {
1501
1501
}
1502
1502
}
1503
1503
1504
-
/// Sets `SO_PEERCRED` to null on the socket.
1505
-
///
1506
-
/// This is a Cygwin extension.
1507
-
///
1508
-
/// Normally the Unix domain sockets of Cygwin are implemented by TCP sockets,
1509
-
/// so it performs a handshake on `connect` and `accept` to verify the remote
1510
-
/// connection and exchange peer cred info. At the time of writing, this
1511
-
/// means that `connect` on a Unix domain socket will block until the server
1512
-
/// calls `accept` on Cygwin. This behavior is inconsistent with most other
1513
-
/// platforms, and this option can be used to disable that.
1514
-
///
1515
-
/// See also: the [mailing list](https://inbox.sourceware.org/cygwin/TYCPR01MB10926FF8926CA63704867ADC8F8AA2@TYCPR01MB10926.jpnprd01.prod.outlook.com/)
0 commit comments