pub fn listen_on_addr(
    socket_addr: SocketAddr
) -> (impl Stream<Item = Offchain>, SocketAddr)
Expand description

Listens on a tcp port and produces Offchains.

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.