1POE::Driver::SysRW(3) User Contributed Perl DocumentationPOE::Driver::SysRW(3)
2
3
4
6 POE::Driver::SysRW - buffered, non-blocking I/O using sysread and
7 syswrite
8
10 "SYNOPSIS" in POE::Driver illustrates how the interface works. This
11 module is merely one implementation.
12
14 This driver implements POE::Driver using sysread and syswrite.
15
17 POE::Driver::SysRW introduces some additional features not covered in
18 the base interface.
19
20 new [BlockSize => OCTETS]
21 new() creates a new buffered I/O driver that uses sysread() to read
22 data from a handle and syswrite() to flush data to that handle. The
23 constructor accepts one optional named parameter, "BlockSize", which
24 indicates the maximum number of OCTETS that will be read at one time.
25
26 "BlockSize" is 64 kilobytes (65536 octets) by default. Higher values
27 may improve performance in streaming applications, but the trade-off is
28 a lower event granularity and increased resident memory usage.
29
30 Lower "BlockSize" values reduce memory consumption somewhat with
31 corresponding throughput penalties.
32
33 my $driver = POE::Driver::SysRW->new;
34
35 my $driver = POE::Driver::SysRW->new( BlockSize => $block_size );
36
37 Drivers are commonly instantiated within POE::Wheel constructor calls:
38
39 $_[HEAP]{wheel} = POE::Wheel::ReadWrite->new(
40 InputHandle => \*STDIN,
41 OutputHandle => \*STDOUT,
42 Driver => POE::Driver::SysRW->new(),
43 Filter => POE::Filter::Line->new(),
44 );
45
46 Applications almost always use POE::Driver::SysRW, so POE::Wheel
47 objects almost always will create their own if no Driver is specified.
48
49 All Other Methods
50 POE::Driver::SysRW documents the abstract interface documented in
51 POE::Driver. Please see POE::Driver for more details about the
52 following methods:
53
54 flush
55 get
56 get_out_messages_buffered
57 put
58
60 POE::Driver, POE::Wheel.
61
62 Also see the SEE ALSO section of POE, which contains a brief roadmap of
63 POE's documentation.
64
66 Please see POE for more information about authors and contributors.
67
68
69
70perl v5.30.0 2019-07-26 POE::Driver::SysRW(3)