MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / getsockname

Function getsockname

src/net/socket.rs:427–429  ·  view source on GitHub ↗
(sockfd: Fd)

Source from the content-addressed store, hash-verified

425/// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Reading-Address.html
426#[inline]
427pub fn getsockname<Fd: AsFd>(sockfd: Fd) -> io::Result<SocketAddrAny> {
428 backend::net::syscalls::getsockname(sockfd.as_fd())
429}
430
431/// `getpeername(fd, addr, len)`—Returns the address a socket is connected
432/// to.

Callers 15

net_dgram_v4_connect_anyFunction · 0.50
net_dgram_v6_connect_anyFunction · 0.50
net_dgram_v4_connectFunction · 0.50
net_dgram_v6_connectFunction · 0.50
getsockname_v4Function · 0.50
getsockname_v6Function · 0.50
net_dgram_v4_bind_anyFunction · 0.50
net_dgram_v6_bind_anyFunction · 0.50
net_dgram_v4_sendtoFunction · 0.50

Calls 1

as_fdMethod · 0.45

Tested by 15

net_dgram_v4_connect_anyFunction · 0.40
net_dgram_v6_connect_anyFunction · 0.40
net_dgram_v4_connectFunction · 0.40
net_dgram_v6_connectFunction · 0.40
net_dgram_v4_bind_anyFunction · 0.40
net_dgram_v6_bind_anyFunction · 0.40
net_dgram_v4_sendtoFunction · 0.40
net_dgram_v6_sendtoFunction · 0.40