IO::LineBufferedSessionData (Chapter 13)

This module works with IO::LineBufferedSet to provide line-oriented reading in a nonblocking multiplexed application. It inherits from IO::SessionData, which is listed in Chapter 13.

 0 package IO::LineBufferedSessionData; 1 # file: IO/LineBufferedSessionData.pm 2 use strict; 3 use Carp; 4 use IO::SessionData; 5 use Errno 'EWOULDBLOCK'; 6 use IO::SessionData; 7 use IO::LineBufferedSet; 8 use vars '@ISA','$VERSION'; 9 @ISA = 'IO::SessionData'; 10 $VERSION = 1.00; 11 use constant BUFSIZE => 3000; 12 # override new() by adding new instance variables 13 sub new { 14 my $pack = shift; 15 my $self = $pack->SUPER::new(@_); 16 @{$self}{qw(read_limit inbuffer linemode index eof error)} = (BUFSIZE,' ', 0,0,0,0); ...

Get Network Programming with Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.