Function cubist_proxy::listen_on_addr
source · pub fn listen_on_addr(
socket_addr: SocketAddr
) -> (impl Stream<Item = Offchain>, SocketAddr)
Expand description
Listens on a tcp port and produces Offchain
s.
This function returns a stream of Offchains and a SocketAddr representing the bound address. This is useful when passing a SocketAddr with port=0 as an argument, which asks the OS to bind any available port.