zebra_network::peer_set::initialize

Function open_listener

source
pub(crate) async fn open_listener(config: &Config) -> (TcpListener, SocketAddr)
Expand description

Open a peer connection listener on config.listen_addr, returning the opened [TcpListener], and the address it is bound to.

If the listener is configured to use an automatically chosen port (port 0), then the returned address will contain the actual port.

ยงPanics

If opening the listener fails.