Documentation
¶
Overview ¶
Package freebind provides a net.ListenConfig.Control hook that sets the Linux IP_FREEBIND (and IPV6_FREEBIND) socket option, allowing listeners to bind to IP addresses that are not yet assigned to a network interface.
Index ¶
Constants ¶
const Supported = true
Supported reports whether the freebind Control hook has an effect on this platform. It is true on Linux.
Variables ¶
This section is empty.
Functions ¶
func Control ¶
Control is a net.ListenConfig.Control function that enables binding to not-yet-available addresses by setting IP_FREEBIND (IPv4) and IPV6_FREEBIND (IPv6) on the socket.
Both options are attempted; depending on the socket's address family one of them returns ENOPROTOOPT, which is expected. The call only fails if neither option could be set.
Types ¶
This section is empty.