How to get port number of ephemeral port?

If I do,

using Sockets
l = listen(IPv4(""),0)

then I’ve created a socket to listen on ephemeral port. Is there a way from Julia to get the port number so I know where to connect to from the other process? Thanks.

Ah methodswith(typeof(l)) gave me a hint where to look and looks like,


is my answer.