NAME

IO::Mux::Select - Drop-in replacement for IO::Select when using IO::Mux::Handle objects.

SYNOPSIS

use IO::Mux ;
use IO::Mux::Select ;

my $mux = new IO::Mux(\*R) ;
my $alice = $mux->new_handle() ;
open($alice, 'alice') ;
my $bob = $mux->new_handle() ;
open($bob, 'bob') ;

my $ims = new IO::Mux::Select($alice, $bob) ;
while(my @ready = $ims->can_read()){
  foreach my $h (@ready){
    # Do something useful...
  }
}

DESCRIPTION

IO::Mux::Select is a drop-in replacement for IO::Select that knows how to deal with IO::Mux::Handle handles. It also supports real handles so you can mix IO::Mux::Handle handles with real handles.

CONSTRUCTOR

new ( [ HANDLES ] )

The constructor creates a new object and optionally initialises it with a set of handles.

METHODS

The same interface as IO::Select is supported, with the following exceptions:

can_read ( [ TIMEOUT ] )

This method behaves pretty much like the IO::Select one, except it is not guaranteed that it will return before TIMEOUT seconds. The reason for this is that the IO:Mux::Handle objets handle data in packets, so if data is "detected" on such a handle, can_read() must read the entire packet before returning.

can_write ( [ TIMEOUT ] )

Not implemented.

has_exception ( [ TIMEOUT ] )

Not implemented.

bits ()

Not implemented.

select ( READ, WRITE, EXCEPTION [, TIMEOUT ] )

Not implemented.

SEE ALSO

IO::Select, IO::Mux, IO::Mux::Handle

AUTHOR

Patrick LeBoutillier, <patl@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2005 by Patrick LeBoutillier

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.