Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.469 kB
package EchoStream;
use Moose;
extends 'Reflex::Stream';
sub on_stream_data {
my ($self, $args) = @_;
$self->put($args->{data});
}
sub on_stream_failure {
my ($self, $args) = @_;
warn "$args->{errfun} error $args->{errnum}: $args->{errstr}\n";
$self->emit( event => "stopped", args => {} );
}
sub on_stream_closed {
my ($self, $args) = @_;
$self->emit( event => "stopped", args => {} );
}
sub DEMOLISH {
print "EchoStream demolished as it should.\n";
}
1;
Jump to Line
Something went wrong with that request. Please try again.