wSocket;
use 5.006;
use Any::Moose;
=head1 NAME
AnyMQ::ZeroMQ - AnyMQ using just a socket and JSON.
=head1 VERSION
Version 0.01
=cut
our $VERSION = '0.02';
=head1 SYNOPSIS
my $bus = AnyMQ-
vent (@events) {
# send as json to connected listeners
foreach my $connection ($self->bus->all_connections) {
$connection->push_write(json => $event);
}
}
};
1
w AnyEvent::Handle
fh => $fh,
on_read => sub {
$h->push_read(json => sub {
my (undef, $evt) = @_;
$self->handle_event($evt);