Reflex
view release on metacpan or search on metacpan
Reflex::Client - A non-blocking socket client.
Reflex::Connector - A non-blocking client socket connector.
Reflex::Role::Accepting - Add non-blocking connection accepting to a
role.
Reflex::Role::Connecting - Add non-blocking client connecting to a class.
Reflex::Role::InStreaming - Add non-blocking streaming input behavior to
a class.
Reflex::Role::OutStreaming - Add non-blocking streaming output behavior
to a class.
Reflex::Role::Readable - Add non-blocking readable-watching behavior to a
class.
Reflex::Role::Reading - Add standard non-blocking sysread() behavior to a
class.
Reflex::Role::Recving - Add standard non-blocking send/recv behavior to a
class.
Reflex::Role::Streaming - Add non-blocking streaming I/O behavior to a
class.
Reflex::Role::Writable - Add non-blocking writable-watching behavior to a
class.
Reflex::Role::Writing - Add standard non-blocking syswrite() behavior to
a class.
Reflex::Stream - A non-blocking, buffered and translated I/O stream.
README.mkdn view on Meta::CPAN
### Reflex::Acceptor - A non-blocking server (client socket acceptor).
### Reflex::Client - A non-blocking socket client.
### Reflex::Connector - A non-blocking client socket connector.
### Reflex::Role::Accepting - Add non-blocking connection accepting to a role.
### Reflex::Role::Connecting - Add non-blocking client connecting to a class.
### Reflex::Role::InStreaming - Add non-blocking streaming input behavior to a class.
### Reflex::Role::OutStreaming - Add non-blocking streaming output behavior to a class.
### Reflex::Role::Readable - Add non-blocking readable-watching behavior to a class.
### Reflex::Role::Reading - Add standard non-blocking sysread() behavior to a class.
### Reflex::Role::Recving - Add standard non-blocking send/recv behavior to a class.
### Reflex::Role::Streaming - Add non-blocking streaming I/O behavior to a class.
### Reflex::Role::Writable - Add non-blocking writable-watching behavior to a class.
### Reflex::Role::Writing - Add standard non-blocking syswrite() behavior to a class.
### Reflex::Stream - A non-blocking, buffered and translated I/O stream.
### Reflex::UdpPeer - A base class for non-blocking UDP networking peers.
## Signals and Child Processes
lib/Reflex.pm view on Meta::CPAN
=head3 Reflex::Acceptor - A non-blocking server (client socket acceptor).
=head3 Reflex::Client - A non-blocking socket client.
=head3 Reflex::Connector - A non-blocking client socket connector.
=head3 Reflex::Role::Accepting - Add non-blocking connection accepting to a role.
=head3 Reflex::Role::Connecting - Add non-blocking client connecting to a class.
=head3 Reflex::Role::InStreaming - Add non-blocking streaming input behavior to a class.
=head3 Reflex::Role::OutStreaming - Add non-blocking streaming output behavior to a class.
=head3 Reflex::Role::Readable - Add non-blocking readable-watching behavior to a class.
=head3 Reflex::Role::Reading - Add standard non-blocking sysread() behavior to a class.
=head3 Reflex::Role::Recving - Add standard non-blocking send/recv behavior to a class.
=head3 Reflex::Role::Streaming - Add non-blocking streaming I/O behavior to a class.
=head3 Reflex::Role::Writable - Add non-blocking writable-watching behavior to a class.
=head3 Reflex::Role::Writing - Add standard non-blocking syswrite() behavior to a class.
=head3 Reflex::Stream - A non-blocking, buffered and translated I/O stream.
=head3 Reflex::UdpPeer - A base class for non-blocking UDP networking peers.
=head2 Signals and Child Processes
lib/Reflex/Role/InStreaming.pm view on Meta::CPAN
__END__
=pod
=encoding UTF-8
=for :stopwords Rocco Caputo
=head1 NAME
Reflex::Role::InStreaming - add streaming input behavior to a class
=head1 VERSION
This document describes version 0.100, released on April 02, 2017.
=head1 SYNOPSIS
use Moose;
has socket => ( is => 'rw', isa => 'FileHandle', required => 1 );
lib/Reflex/Role/InStreaming.pm view on Meta::CPAN
sub on_socket_closed {
my $self = shift;
print "Connection closed.\n";
$self->stopped();
}
=head1 DESCRIPTION
Reflex::Role::InStreaming is a Moose parameterized role that adds
asynchronous streaming input behavior to Reflex-based classes. It
comprises Reflex::Role::Collectible for dynamic composition,
Reflex::Role::Readable for asynchronous input watching, and
Reflex::Role::Reading to perform input.
See Reflex::Stream if you prefer runtime composition with objects, or
you just find Moose syntax difficult to handle.
=head2 Required Role Parameters
=head3 handle
lib/Reflex/Role/OutStreaming.pm view on Meta::CPAN
__END__
=pod
=encoding UTF-8
=for :stopwords Rocco Caputo
=head1 NAME
Reflex::Role::OutStreaming - add streaming input behavior to a class
=head1 VERSION
This document describes version 0.100, released on April 02, 2017.
=head1 SYNOPSIS
use Moose;
has socket => ( is => 'rw', isa => 'FileHandle', required => 1 );
lib/Reflex/Role/Streaming.pm view on Meta::CPAN
__END__
=pod
=encoding UTF-8
=for :stopwords Rocco Caputo
=head1 NAME
Reflex::Role::Streaming - add streaming I/O behavior to a class
=head1 VERSION
This document describes version 0.100, released on April 02, 2017.
=head1 SYNOPSIS
use Moose;
has socket => ( is => 'rw', isa => 'FileHandle', required => 1 );
lib/Reflex/Role/Streaming.pm view on Meta::CPAN
sub on_socket_closed {
my $self = shift;
print "Connection closed.\n";
$self->stopped();
}
=head1 DESCRIPTION
Reflex::Role::Streaming is a Moose parameterized role that adds
streaming I/O behavior to Reflex-based classes. In the SYNOPSIS, a
filehandle named "socket" is turned into a NBIO stream by the addition
addition of Reflex::Role::Streaming.
See Reflex::Stream if you prefer runtime composition with objects, or
you just find Moose syntax difficult to handle.
=head2 Required Role Parameters
=head3 handle
lib/Reflex/Role/Streaming.pm view on Meta::CPAN
=head3 method_put
C<method_put> defines the name of a method that will write data octets
to the role's handle, or buffer them if the handle can't accept them.
It's implemented in terms of Reflex::Role::Writing, and it adds code
to flush the buffer in the background using Reflex::Role::Writable.
The method created by C<method_put> returns the same value as
L<Reflex::Role::Writing/method_put> does: a status of the output
buffer after flushing is attempted.
The default name for C<method_put> is "put_" followed by the streaming
handle's name, such as put_XYZ().
The put method takes an list of strings of raw octets:
my $pending_count = $self->put_XYZ(
"raw octets here", " and some more"
);
If C<method_put>'s method encounters an error, it invokes the
C<cb_error> callback before returning undef. The C<method_put> method
( run in 0.363 second using v1.01-cache-2.11-cpan-4d50c553e7e )