3
my $c = IO::Socket::INET.new(:host<localhost>, :port(80));
$c.print: 'Test';
say $c.recv;
我該如何設置超時IO :: Socket :: INET recv?perl6 io :: socket :: inet如何設置socket的超時時間?
my $c = IO::Socket::INET.new(:host<localhost>, :port(80));
$c.print: 'Test';
say $c.recv;
我該如何設置超時IO :: Socket :: INET recv?perl6 io :: socket :: inet如何設置socket的超時時間?
查看Promise.anyof
doc中的超時示例。
(另請參閱Concurrent::Progress瞭解跟蹤進度的更一般情況。)