Mark Overmeer > IOMux > IOMux::Bundle

Download:
IOMux-0.12.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.12   Source  

NAME ^

IOMux::Bundle - logical group of connections

INHERITANCE ^

 IOMux::Bundle
   is a IOMux::Handler::Read
   is a IOMux::Handler

 IOMux::Bundle
   is a IOMux::Handler::Write
   is a IOMux::Handler

 IOMux::Bundle is extended by
   IOMux::IPC

SYNOPSIS ^

  my $syscall = IOMux::Bundle::Parallel->new(...);
  $mux->add($syscall);

DESCRIPTION ^

A bundle is a set of file handles, so a convenience wrapper around a set of different connections with a single purpose.

METHODS ^

Constructors

IOMux::Bundle->new(OPTIONS)

The stdin, stdout and stderr objects are from the perspective of the other side.

 -Option    --Defined in     --Default
  fh          IOMux::Handler   <required>
  name        IOMux::Handler   <stringified handle>
  read_size   IOMux::Handler::Read  32768
  stderr                       <undef>
  stdin                        <required>
  stdout                       <required>
  write_size  IOMux::Handler::Write  4096
fh => FILEHANDLE
name => STRING
read_size => INTEGER
stderr => IOMux::Handler::Read object
stdin => IOMux::Handler::Write object
stdout => IOMux::Handler::Read object
write_size => INTEGER
IOMux::Bundle->open(MODE, WHAT, OPTIONS) See "Constructors" in IOMux::Handler
IOMux::Bundle->open(MODE, WHAT, OPTIONS) See "Constructors" in IOMux::Handler

Accessors

$obj->connections
$obj->fh See "Accessors" in IOMux::Handler
$obj->fh See "Accessors" in IOMux::Handler
$obj->fileno See "Accessors" in IOMux::Handler
$obj->fileno See "Accessors" in IOMux::Handler
$obj->mux See "Accessors" in IOMux::Handler
$obj->mux See "Accessors" in IOMux::Handler
$obj->name See "Accessors" in IOMux::Handler
$obj->name See "Accessors" in IOMux::Handler
$obj->readSize([INTEGER]) See "Accessors" in IOMux::Handler::Read
$obj->stderr
$obj->stdin
$obj->stdout
$obj->usesSSL See "Accessors" in IOMux::Handler
$obj->usesSSL See "Accessors" in IOMux::Handler
$obj->writeSize([INTEGER]) See "Accessors" in IOMux::Handler::Write

User interface

Connection

$obj->close([CALLBACK]) See "Connection" in IOMux::Handler
$obj->close([CALLBACK]) See "Connection" in IOMux::Handler
$obj->timeout([TIMEOUT]) See "Connection" in IOMux::Handler
$obj->timeout([TIMEOUT]) See "Connection" in IOMux::Handler

Reading

$obj->readline(CALLBACK) See "Reading" in IOMux::Handler::Read
$obj->slurp(CALLBACK) See "Reading" in IOMux::Handler::Read

Writing

$obj->print(STRING|SCALAR|LIST|ARRAY) See "Writing" in IOMux::Handler::Write
$obj->printf(FORMAT, PARAMS) See "Writing" in IOMux::Handler::Write
$obj->say(STRING|SCALAR|LIST|ARRAY) See "Writing" in IOMux::Handler::Write
$obj->write(SCALAR, [MORE]) See "Writing" in IOMux::Handler::Write

Multiplexer

Connection

$obj->mux_init(MUX, [HANDLER]) See "Connection" in IOMux::Handler
$obj->mux_init(MUX, [HANDLER]) See "Connection" in IOMux::Handler
$obj->mux_remove See "Connection" in IOMux::Handler
$obj->mux_remove See "Connection" in IOMux::Handler
$obj->mux_timeout See "Connection" in IOMux::Handler
$obj->mux_timeout See "Connection" in IOMux::Handler

Reading

$obj->mux_eof(INPUT) See "Reading" in IOMux::Handler::Read
$obj->mux_except_flagged(FILENO) See "Reading" in IOMux::Handler
$obj->mux_except_flagged(FILENO) See "Reading" in IOMux::Handler
$obj->mux_input(BUFFER) See "Reading" in IOMux::Handler::Read
$obj->mux_read_flagged(FILENO) See "Reading" in IOMux::Handler
$obj->mux_read_flagged(FILENO) See "Reading" in IOMux::Handler

Writing

$obj->mux_outbuffer_empty See "Writing" in IOMux::Handler::Write
$obj->mux_output_waiting See "Writing" in IOMux::Handler::Write
$obj->mux_write_flagged(FILENO) See "Writing" in IOMux::Handler
$obj->mux_write_flagged(FILENO) See "Writing" in IOMux::Handler

Service

Errors

$obj->mux_error(BUFFER)

Called when new input has arrived on the error channel. It is passed a reference to the error BUFFER. It must remove any input that it you have consumed from the BUFFER, and leave any partially received data in there for more text to arrive.

example:

  # actually, this is the default behavior
  sub mux_error
  {   my ($self, $errbuf) = @_;
      print STDERR $$errbuf;
      $$errbuf = '';
  } 

Helpers

$obj->extractSocket(HASH)
IOMux::Bundle->extractSocket(HASH) See "Helpers" in IOMux::Handler
$obj->extractSocket(HASH)
IOMux::Bundle->extractSocket(HASH) See "Helpers" in IOMux::Handler
$obj->fdset(STATE, READ, WRITE, ERROR) See "Helpers" in IOMux::Handler
$obj->fdset(STATE, READ, WRITE, ERROR) See "Helpers" in IOMux::Handler
$obj->show See "Helpers" in IOMux::Handler
$obj->show See "Helpers" in IOMux::Handler

SEE ALSO ^

This module is part of IOMux distribution version 0.12, built on January 27, 2011. 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 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

syntax highlighting: