The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IOMux::Poll - simplify use of poll()

INHERITANCE

 IOMux::Poll
   is a IOMux

SYNOPSIS

  use IOMux::Poll;

  my $mux    = IOMux::Poll->new;
  my $server = IOMux::Service::TCP->new(...);
  $mux->add($server);
  $mux->loop;

DESCRIPTION

Multiplexer based on the poll() system call, defined by POSIX.

The poll has less administration overhead than the select call (implemented via IOMux::Select) because it avoids the need to play with bit-vectors to see which file handles got activated. However, poll is not supported on all platforms.

Extends "DESCRIPTION" in IOMux.

METHODS

Extends "METHODS" in IOMux.

Constructors

Extends "Constructors" in IOMux.

IOMux::Poll->new(OPTIONS)

Inherited, see "Constructors" in IOMux

Accessors

Extends "Accessors" in IOMux.

$obj->poller()

The internal IO::Poll object.

User interface

Extends "User interface" in IOMux.

$obj->add(HANDLER|BUNDLE)

Inherited, see "User interface" in IOMux

$obj->endLoop(BOOLEAN)

Inherited, see "User interface" in IOMux

$obj->loop( [HEARTBEAT] )

Inherited, see "User interface" in IOMux

$obj->open(MODE, PARAMS)

Inherited, see "User interface" in IOMux

For internal use

Extends "For internal use" in IOMux.

$obj->changeTimeout(FILENO, OLDTIMEOUT, NEWTIMEOUT)

Inherited, see "For internal use" in IOMux

$obj->fdset(FILENO, STATE, READ, WRITE, EXCEPT)

Inherited, see "For internal use" in IOMux

$obj->handler( FILENO, [HANDLER] )

Inherited, see "For internal use" in IOMux

$obj->handlers()

Inherited, see "For internal use" in IOMux

$obj->remove(FILENO)

Inherited, see "For internal use" in IOMux

DETAILS

Extends "DETAILS" in IOMux.

Installation

Extends "Installation" in IOMux.

Event managers

Extends "Event managers" in IOMux.

File handles

Extends "File handles" in IOMux.

Implementation limitations

Poll is only available on UNIX. Windows Vista has added a WSAPoll with comparible functionality (probably), but afaik there is no binary wrapper available for perl yet.

SEE ALSO

This module is part of IOMux distribution version 0.13, built on July 21, 2015. Website: http://perl.overmeer.net/ All modules in this suite: "Any::Daemon", "IOMux", and "IOMux::HTTP".

Please post questions or ideas to perl@overmeer.net

LICENSE

Copyrights 2011-2015 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html