Skip to main content

loopback_socket_peer

Function loopback_socket_peer 

Source
pub fn loopback_socket_peer(
    local: SocketAddr,
    peer: SocketAddr,
) -> Option<SocketPeer>
Expand description

Resolve the connecting process, given the accepted stream’s local and peer addresses, in that order. The lookup matches both endpoints in reverse: the owning socket’s local address is peer, not the listener’s address.

Returns None on unsupported platforms, non-loopback connections, lookup races, multiple visible holders, or insufficient OS visibility. This is a blocking, diagnostic lookup, not an authorization check; failure must not by itself refuse a request.