Documentation for method
listen assembled from the following types:
method listen(Str , Int --> Supply)
Creates a listening socket on the specified
$port, returning a Supply to which the accepted client IO::Socket::Asyncs will be emitted. This Supply should be tapped start listening for client connections. You can set
0 if you want the operating system to find one for you.
The IO::Socket::Async::ListenSocket returned by calling the tap method on the supply returned represents the underlying listening TCP socket, which can be closed using its close method. If
$port was set to
0, you can get the port the socket ended up with using its socket-port method.