Kai-Hsiang Chuang > IO-Multiplex-KQueue-0.02 > IO::Multiplex::KQueue

Download:
IO-Multiplex-KQueue-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

IO::Multiplex::KQueue - IO::Multiplex by kqueue(2)

SYNOPSIS ^

  use IO::Multiplex::KQueue;

  my $mux = new IO::Multiplex::KQueue;
  $mux->add($fh1);
  $mux->add(\*FH2);
  $mux->set_callback_object(...);
  $mux->listen($server_socket);
  $mux->loop;

  sub mux_input {
    ...
  }

DESCRIPTION ^

IO::Multiplex::KQueue is kqueue(2) IO::Multiplex implementation with compatible interface to IO::Multiplex (version 1.08). Please refer IO::Multiplex for details.

Just install IO::KQueue and replace IO::Multiplex with IO::Multiplex::KQueue in your source code.

EXAMPLES ^

Orignal Source

    use IO::Socket;
    use IO::Multiplex;

    # Create a multiplex object
    my $mux  = new IO::Multiplex;

Using IO::Multiplex::KQueue

    use IO::Socket;
    use IO::Multiplex::KQueue;

    # Create a multiplex object
    my $mux  = new IO::Multiplex::KQueue;
    # done! no futher modification!

BUGS ^

heartbeat is not supported in IO::Multiplex::KQueue.

You may get several "read error: Operation timed out" warings.

NOTE ^

IO::KQueue 0.29 has a bug to handle timeout. please install http://www.in2home.org/download/IO-KQueue-0.30.tar.gz or you will fail t/110_ntest.t.

SEE ALSO ^

IO::Multiplex, IO::KQueue, kqueue(2).

AUTHOR ^

IO::Multiplex

Copyright 1999 Bruce J Keeler <bruce@gridpoint.com>

Copyright 2001-2003 Rob Brown <bbb@cpan.org>

IO::Multiplex::KQueue

Copyright 2005 Kai-Hsiang Chuang <in2@in2home.org>

Released under the terms of the Artistic License.

syntax highlighting: