Skip to main content

extract_peer_ip

Function extract_peer_ip 

Source
pub const fn extract_peer_ip(peer: SocketAddr) -> IpAddr
Expand description

Return the IP address of a transport peer supplied out-of-band by an adapter.

This is a direct conversion from SocketAddr to IpAddr. It does not read HTTP fields or apply a proxy policy. The caller is responsible for supplying the actual connection peer rather than a header-derived address.