.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "POE::Driver::SysRW 3pm" .TH POE::Driver::SysRW 3pm "2020-02-07" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" POE::Driver::SysRW \- buffered, non\-blocking I/O using sysread and syswrite .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\*(L"\s-1SYNOPSIS\*(R"\s0 in POE::Driver illustrates how the interface works. This module is merely one implementation. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This driver implements POE::Driver using sysread and syswrite. .SH "PUBLIC METHODS" .IX Header "PUBLIC METHODS" POE::Driver::SysRW introduces some additional features not covered in the base interface. .SS "new [BlockSize => \s-1OCTETS\s0]" .IX Subsection "new [BlockSize => OCTETS]" \&\fBnew()\fR creates a new buffered I/O driver that uses \fBsysread()\fR to read data from a handle and \fBsyswrite()\fR to flush data to that handle. The constructor accepts one optional named parameter, \f(CW\*(C`BlockSize\*(C'\fR, which indicates the maximum number of \s-1OCTETS\s0 that will be read at one time. .PP \&\f(CW\*(C`BlockSize\*(C'\fR is 64 kilobytes (65536 octets) by default. Higher values may improve performance in streaming applications, but the trade-off is a lower event granularity and increased resident memory usage. .PP Lower \f(CW\*(C`BlockSize\*(C'\fR values reduce memory consumption somewhat with corresponding throughput penalties. .PP .Vb 1 \& my $driver = POE::Driver::SysRW\->new; \& \& my $driver = POE::Driver::SysRW\->new( BlockSize => $block_size ); .Ve .PP Drivers are commonly instantiated within POE::Wheel constructor calls: .PP .Vb 6 \& $_[HEAP]{wheel} = POE::Wheel::ReadWrite\->new( \& InputHandle => \e*STDIN, \& OutputHandle => \e*STDOUT, \& Driver => POE::Driver::SysRW\->new(), \& Filter => POE::Filter::Line\->new(), \& ); .Ve .PP Applications almost always use POE::Driver::SysRW, so POE::Wheel objects almost always will create their own if no Driver is specified. .SS "All Other Methods" .IX Subsection "All Other Methods" POE::Driver::SysRW documents the abstract interface documented in POE::Driver. Please see POE::Driver for more details about the following methods: .IP "flush" 4 .IX Item "flush" .PD 0 .IP "get" 4 .IX Item "get" .IP "get_out_messages_buffered" 4 .IX Item "get_out_messages_buffered" .IP "put" 4 .IX Item "put" .PD .SH "SEE ALSO" .IX Header "SEE ALSO" POE::Driver, POE::Wheel. .PP Also see the \s-1SEE ALSO\s0 section of \s-1POE\s0, which contains a brief roadmap of \s-1POE\s0's documentation. .SH "AUTHORS & COPYRIGHTS" .IX Header "AUTHORS & COPYRIGHTS" Please see \s-1POE\s0 for more information about authors and contributors.