X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FConnectionServer.pm;h=85869d09aea838c9b3cfdecac2349ad5cf6574c2;hp=26536ecc256d41754a34b0d1c3f85b6fec4a5c2a;hb=df8e0ca6a336fb37fd14d40fa345e787bc75b8c2;hpb=5c608989561bc4892923c9e00dd20db910658fd1 diff --git a/lib/Object/Remote/ConnectionServer.pm b/lib/Object/Remote/ConnectionServer.pm index 26536ec..85869d0 100644 --- a/lib/Object/Remote/ConnectionServer.pm +++ b/lib/Object/Remote/ConnectionServer.pm @@ -32,6 +32,10 @@ has connection_args => ( is => 'ro', default => sub { [] } ); +has connection_callback => ( + is => 'ro', default => sub { sub { shift } } +); + sub BUILD { Object::Remote->current_loop->want_run; } @@ -50,7 +54,7 @@ sub _listen_ready { send_to_fh => $new, on_close => $f, # and so will die $c @{$self->connection_args} - ); + )->${\$self->connection_callback}; $f->on_ready(sub { undef($c) }); $c->ready_future->done; print $new "Shere\n" or die "Couldn't send to new socket: $!";