NAME
IOMux::File::Read - write to file
INHERITANCE
IOMux::File::Read
is an IOMux::Handler::Read
is an IOMux::Handler
SYNOPSIS
my $mux = IOMux::Select->new; # or ::Poll
use IOMux::Open '<';
my $file = $mux->open('<', $filename);
use IOMux::File::Read;
my $file = IOMux::File::Read->new(file => $filename);
$mux->add($file);
$file->getline(sub {print "\n"});
DESCRIPTION
In an event driven program, reading is harder to use than writing: the read will very probably be stalled until data has arrived, so you will need a callback to handle the resulting data.
Extends "DESCRIPTION" in IOMux::Handler::Read.
METHODS
Extends "METHODS" in IOMux::Handler::Read.
Constructors
Extends "Constructors" in IOMux::Handler::Read.
- IOMux::File::Read->new(%options)
-
-Option --Defined in --Default exclusive <false> fh IOMux::Handler <required> file <required> mode '<' modeflags <undef> name IOMux::Handler '<$file' read_size IOMux::Handler::Read 32768
- exclusive => BOOLEAN
- fh => FILEHANDLE
- file => FILENAME|HANDLE
- mode => '<'
-
For now, the mode is always simply 'read'
- modeflags => INTEGER
-
When defined, the
exclusive
option is not used, but your value is taken. Use constants defined by Fcntl. Do not forget to includeO_NONBLOCK
. - name => STRING
- read_size => INTEGER
- IOMux::File::Read->open($mode, $file, %options)
Accessors
Extends "Accessors" in IOMux::Handler::Read.
- $obj->fh()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->fileno()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->mode()
-
The bits of the open mode.
- $obj->mux()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->name()
-
Inherited, see "Accessors" in IOMux::Handler
- $obj->readSize( [$integer] )
-
Inherited, see "Accessors" in IOMux::Handler::Read
- $obj->usesSSL()
-
Inherited, see "Accessors" in IOMux::Handler
User interface
Extends "User interface" in IOMux::Handler::Read.
Multiplexer
Extends "Multiplexer" in IOMux::Handler::Read.
Helpers
Extends "Helpers" in IOMux::Handler::Read.
- $obj->extractSocket(HASH)
- IOMux::File::Read->extractSocket(HASH)
-
Inherited, see "Helpers" in IOMux::Handler
- $obj->fdset($state, $read, $write, $error)
-
Inherited, see "Helpers" in IOMux::Handler
- $obj->show()
-
Inherited, see "Helpers" in IOMux::Handler
SEE ALSO
This module is part of IOMux distribution version 1.01, built on January 15, 2020. Website: http://perl.overmeer.net/CPAN
LICENSE
Copyrights 2011-2020 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/