Skip to main content

Module socket_peer

Module socket_peer 

Source
Expand description

Best-effort process descriptions for the peer of an accepted loopback TCP connection. These snapshots are not credentials: processes can exit, exec, or share a socket while a lookup is running. macOS libproc and Linux procfs enumerate socket holders; if more than one visible process holds the peer socket (for example after fork), the caller is ambiguous and unresolved. Windows’ TCP owner table reports one owning PID per connection, not every process with an inherited or duplicated socket handle, so it cannot detect that kind of sharing. None of these OS snapshots proves exclusive ownership.

Structs§

SocketPeer
The process holding the connecting end of a loopback TCP connection.

Functions§

loopback_socket_peer
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.