PerlIO::via::Timeout::Strategy::SetSockOpt - a PerlIO::via::Timeout::Strategy, the uses setsockopt
version 0.10
my $strategy = PerlIO::via::Timeout::Strategy::SetSockOpt->new( read_timeout => 1, write_timeout => 2, );
This class implements a timeout strategy to be used by PerlIO::via::Timeout. It will work only on sockets, as it uses setsockopt.
setsockopt
Constructor of the strategy. Takes as arguments a list of key / values :
The read timeout in second. Can be a float
The write timeout in second. Can be a float
Boolean. Defaults to 1
$strategy->is_valid()
Returns wether the socket from the strategy is still valid.
Damien "dams" Krotkine
This software is copyright (c) 2013 by Damien "dams" Krotkine.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install IO::Socket::Timeout, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::Socket::Timeout
CPAN shell
perl -MCPAN -e shell install IO::Socket::Timeout
For more information on module installation, please visit the detailed CPAN module installation guide.