Group
Extension

Matches 10

Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/junkyard/irc_gw.pl ( view source; MetaCPAN )
strict;
#use AnyEvent::Impl::Perl;
use AnyEvent;
use AnyEvent::IRC::Client;
use Data::Dumper;
use JSON;
use Padre::Swarm::Transport::Multicast;
my $gatewayid = rand() . $$;

my $swarm = Padre::Swarm::
w(
   fh => $socket,
   on_eof => sub { $swarm->shutdown },
   on_read => sub { $_[0]->push_read( json => \&swarm_relay ) ; },
   on_error => sub { warn "Error @_ " },
   
);

my $con = AnyEvent::IRC:
entity => $con->nick, };
            
      $swarm->tell_channel( 12000, JSON::encode_json $msg );
      #$io->push_write( json => $msg );
   }
);

$con->connect ("irc.perl.org", 6667 ,
 { nick => $ni
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/lib/Padre/Plugin/Swarm/Transport/Local/Multicast/Service.pm ( view source; MetaCPAN )
package Padre::Plugin::Swarm::Transport::Local::Multicast::Service;
use strict;
use warnings;
use JSON;
use Padre::Wx      ();
use Padre::Task ();
use Padre::Logger;
use Padre::Swarm::Message;
use IO:
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/junkyard/aewx_sockpair.pl ( view source; MetaCPAN )
ocal $ENV{PERL_ANYEVENT_MODEL} = 'Perl';
require AnyEvent;
require IO::Socket::Multicast;
require JSON;
   my $bailout = AnyEvent->condvar;

   my $timer = AnyEvent->timer( interval => $freq , cb => \
ined(my $m = $q->dequeue_nb) ) {
        print STDERR "Got message '$m'";
        my $msg = JSON::encode_json( { type=>'chat' , body=>$m , from=>$0.$$ } );
        $c->mcast_send( $msg , '239.255.255.
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/lib/Padre/Swarm/Message.pm ( view source; MetaCPAN )
{
    my $self = shift;
    $self->{origin} = shift if @_;
    return $self->{origin};
}


sub TO_JSON {
	## really should be the canonical identity
	my $self = shift;
	my $ref = { %$self } ; # erm - 
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/junkyard/aewx.pl ( view source; MetaCPAN )
ocal $ENV{PERL_ANYEVENT_MODEL} = 'Perl';
require AnyEvent;
require IO::Socket::Multicast;
require JSON;
   my $bailout = AnyEvent->condvar;

   my $timer = AnyEvent->timer( interval => $freq , cb => \
ined(my $m = $q->dequeue_nb) ) {
        print STDERR "Got message '$m'";
        my $msg = JSON::encode_json( { type=>'chat' , body=>$m , from=>$0.$$ } );
        $c->mcast_send( $msg , '239.255.255.
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/lib/Padre/Swarm/Geometry.pm ( view source; MetaCPAN )
hift;
	my $message = shift;
	my @s = $self->graph->successors( $message->{from} );
	$self->graph->delete_vertex( $_ )
	    for @s, $message->{from};
	
	
}


sub TO_JSON {
	
}

sub FROM_JSON {
	
}

1;
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/lib/Padre/Plugin/Swarm/Transport/Local.pm ( view source; MetaCPAN )
 Object::Event );
use AnyEvent::Handle;
use IO::Socket::Multicast;
use Padre::Swarm::Message;
use JSON;
our $VERSION = '0.2';

=pod

=head1 NAME

Padre::Plugin::Swarm::Transport::Local - Multicast swa
);
    }
    $self->unreg_me;
}

sub _marshal {
    JSON->new
        ->allow_blessed
        ->convert_blessed
        ->utf8
        ->filter_json_object(\&synthetic_class );
}


sub synthetic_class
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/lib/Padre/Plugin/Swarm/Transport/Global.pm ( view source; MetaCPAN )
adre::Swarm::Message;
use AnyEvent::Socket;
use AnyEvent::Handle;
use Scalar::Util 'blessed';
use JSON;

our $VERSION = '0.2';

sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);
d ' . $!);
        return;   
    }
    my $h = AnyEvent::Handle->new(
        fh => $fh,
        json => $self->_marshal,
        on_eof => sub { $self->event('disconnect', shift ) },
    );
    
   
connect', \&disconnect );
    
    $self->{h} = $h;
    $h->push_write( json => { trustme=>$$.rand() } );
    $h->push_read( json => sub { $self->event( 'see_auth' , @_ ) } );
    $self->reg_cb( 'see_
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/lib/Padre/Plugin/Swarm/Transport.pm ( view source; MetaCPAN )
package Padre::Plugin::Swarm::Transport;
use strict;
use warnings;
use Padre::Logger;
use JSON::PP;

use base 'Object::Event';
 

use Class::XSAccessor
		accessors => {
			marshal => 'marshal',
			on_
age - $@" ) if DEBUG;
	}
	
}

sub _marshal {
	JSON::PP->new
	    ->allow_blessed
            ->convert_blessed
            ->utf8
            ->filter_json_object(\&synthetic_class );
}


sub syntheti
Padre-Plugin-Swarm ( B/BR/BRAMBLE/Padre-Plugin-Swarm-0.2.tar.gz, BRAMBLE, 2011; MetaCPAN )
Padre-Plugin-Swarm/junkyard/relay.pl ( view source; MetaCPAN )
 strict;
use AnyEvent;
use AnyEvent::Socket;
use AnyEvent::Handle;
use IO::Socket::Multicast;
use JSON;
use Carp qw( cluck );

$|++;

#use Padre::Swarm::Transport::Multicast;
#my $mc = Padre::Swarm::T
,
        trustme => "relay-$$-".time(),
    };
    
    $swarm->push_write( json => $message );
    $swarm->push_read( json => \&swarm_ready );
    
    
}

sub swarm_ready {
    my ($handle ,$messag
   
    $handle->push_write( json => {
        type => 'promote',
        from => $handle->{token},
        service => 'relay',
    } );
    
    $handle->push_write( json => {
        type => 'disco'

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.