IO::LineBufferedSet (Chapter 13)

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

 0 package IO::LineBufferedSet; 1 # file: IO/LineBufferedSet.pm 2 use strict; 3 use Carp; 4 use IO::SessionSet; 5 use IO::LineBufferedSessionData; 6 use vars '@ISA','$VERSION'; 7 @ISA = 'IO::SessionSet'; 8 $VERSION = '1.00'; 9 # override SessionDataClass so that we create an IO::LineBufferedSessionData 10 # rather than an IO::SessionData. 11 sub SessionDataClass { return 'IO::LineBufferedSessionData'; } 12 # override wait() in order to return sessions with pending data immediately. 13 sub wait { 14 my $self = ...

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.