Reputation: 113
my $c = IO::Socket::INET.new(:host<localhost>, :port(80));
$c.print: 'Test';
say $c.recv;
how can i set timeout for IO::Socket::INET recv?
Upvotes: 4
Views: 237
Reputation: 32464
See the timeout example in the Promise.anyof
doc.
(See also Concurrent::Progress for the more general case of tracking progress.)
Upvotes: 4