Skip to main content

bind_reuseport

Function bind_reuseport 

Source
pub fn bind_reuseport(addr: SocketAddr) -> Result<TcpListener, Error>
Expand description

Bind a TCP listener with SO_REUSEPORT so multiple acceptors can share one port with in-kernel load balancing. See crate::tcp::reuseport_listener.

ยงErrors

Returns an error if the socket cannot be created/bound or adopted.