Since version 6.d of Perl 6, you can use port 0
to ask the interpreter to find a port to bind for you:
my $socket = IO::Socket::Async.listen($SOCKET_ADDR, 0);
However, $socket is a Supply
with no information on the low-level socket it's using. What is the way of finding which port is it binding to?