IOMux::Handler::Write - any mux writer
IOMux::Handler::Write is an IOMux::Handler IOMux::Handler::Write is extended by IOMux::Bundle IOMux::File::Write IOMux::Net::TCP IOMux::Pipe::Write
# only use extensions
In an event driven program, you must be careful with every Operation System call, because it can block the event mechanism, hence the program as a whole. Often you can be lazy with writes, because its communication buffers are usually working quite asynchronous... but not always. You may skip the callbacks for small writes and prints.
Extends "DESCRIPTION" in IOMux::Handler.
Extends "METHODS" in IOMux::Handler.
Extends "Constructors" in IOMux::Handler.
-Option --Defined in --Default fh IOMux::Handler <required> name IOMux::Handler <stringified handle> write_size 4096
Inherited, see "Constructors" in IOMux::Handler
Extends "Accessors" in IOMux::Handler.
Inherited, see "Accessors" in IOMux::Handler
The number of bytes written at each write.
Extends "User interface" in IOMux::Handler.
Extends "Connection" in IOMux::Handler.
Inherited, see "Connection" in IOMux::Handler
Send one or more lines to the output. The data is packed into a single string first. The ARRAY (of strings) and SCALAR (ref string) choices are available for efficiency.
example:
$conn->print($some_text); $conn->print(\$some_text); my $fh = $conn->fh; print $fh "%s%d%X", $foo, $bar, $baz;
$conn->printf("%s%d%X", $foo, $bar, $baz); my $fh = $conn->fh; $fh->printf("%s%d%X", $foo, $bar, $baz);
Like print() but adding a newline at the end.
Send the content of the string, passed as reference in SCALAR. You probably want to use print() or printf(). You may provide a code reference to produce $more info when the output buffer get empty.
Extends "Multiplexer" in IOMux::Handler.
Extends "Reading" in IOMux::Handler.
Inherited, see "Reading" in IOMux::Handler
Extends "Writing" in IOMux::Handler.
Called after all pending output has been written to the file descriptor. You may use this callback to produce more data to be written.
When this method is not overruled, the multiplexer will stop listening to the write flag until an explicit write() gets executed.
package My::Service; use base 'IOMux::Net::TCP'; sub muxOutbufferEmpty() { my $self = shift; if(my $data = $self->produce_more_data) { $self->write(\$data); } else { $self->SUPER::muxOutbufferEmpty; } }
Returns true is there is output queued.
Inherited, see "Writing" in IOMux::Handler
Extends "Service" in IOMux::Handler.
Extends "Helpers" in IOMux::Handler.
Inherited, see "Helpers" in IOMux::Handler
This module is part of IOMux distribution version 1.01, built on January 15, 2020. Website: http://perl.overmeer.net/CPAN
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 http://dev.perl.org/licenses/
To install IOMux, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IOMux
CPAN shell
perl -MCPAN -e shell install IOMux
For more information on module installation, please visit the detailed CPAN module installation guide.