IOMux

 view release on metacpan or  search on metacpan

lib/IOMux/Handler.pod  view on Meta::CPAN

=over 4

=item $obj-E<gt>B<muxExceptFlagged>($fileno)

Called (in the rare case) that an exception event if flagged. This
means that the socket needs urgent inspection.

According to the Linux manual page for C<select()>, these exceptions
only happen when out-of-band (OOB) data arrives over udp or tcp.

=item $obj-E<gt>B<muxReadFlagged>($fileno)

Called when the read flag is set for this handler.

When you extend this module, you probably want to override
C<muxConnection()> or C<muxInput()>, not this "raw" method.

=back

=head3 Writing

=over 4

=item $obj-E<gt>B<muxWriteFlagged>($fileno)

Called when the write flag is set for this handler; this indicates
that the output buffer is empty hence more data can be sent.

When you extend this module, you probably want to override
C<muxOutputbufferEmpty()>, not this "raw" method.

=back

=head3 Service

=head2 Helpers

=over 4

=item $obj-E<gt>B<extractSocket>(HASH)

=item IOMux::Handler-E<gt>B<extractSocket>(HASH)

Extract IO::Socket::INET (or ::SSL) parameters from the HASH and
construct a socket from it. The used options are all starting with
a capital and removed from the HASH. Additionally, some controlling
options are used.

 -Option --Default
  socket   <created>
  use_ssl  <false>

=over 2

=item socket => IO::Socket object

You may pre-initialize an IO::Socket.

=item use_ssl => BOOLEAN

When true, a IO::Socket::SSL object will be created, otherwise a
IO::Socket::INET object.

=back

=item $obj-E<gt>B<fdset>($state, $read, $write, $error)

Change the flags for the $read, $write and/or $error acceptance by the
mux to $state.

=item $obj-E<gt>B<show>()

Returns a textblock with some info about the filehandle, for
debugging purposes.

example: 

  print $conn->show;

=back

=head1 SEE ALSO

This module is part of IOMux distribution version 1.01,
built on January 15, 2020. Website: F<http://perl.overmeer.net/CPAN>

=head1 LICENSE

Copyrights 2011-2020 by [Mark Overmeer <markov@cpan.org>]. 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 F<http://dev.perl.org/licenses/>



( run in 1.983 second using v1.01-cache-2.11-cpan-d8267643d1d )