The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

PerlIO::via::Timeout::Strategy - base class for a PerlIO::via::Timeout strategies

VERSION

version 0.20

DESCRIPTION

This package implements the virtual class from which all timeout strategies are supposed to inherit from.

METHODS

read_timeout

Getter / setter of the read timeout value.

write_timeout

Getter / setter of the write timeout value.

timeout_enabled

Getter / setter of the timeout enabled flag.

enable_timeout

equivalent to setting timeout_enabled to 1

disable_timeout

equivalent to setting timeout_enabled to 0

CONSTRUCTOR

new

  my $strategy = PerlIO::via::Timeout::Strategy::Alarm->new(write_timeout => 2)

Creates a new timeout strategy. Takes in argument a hash, which keys can be:

read_timeout

the read timeout in second. Float >= 0. Defaults to 0

write_timeout

the write timeout in second. Float >= 0. Defaults to 0

timeout_enabled

sets/unset timeout. Boolean. Defaults to 1

SEE ALSO

PerlIO::via::Timeout

AUTHOR

Damien "dams" Krotkine

COPYRIGHT AND LICENSE

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.