send ids only for return future
[scpubgit/Object-Remote.git] / bin / object-remote-node
index d938ebc..16defe6 100755 (executable)
@@ -3,7 +3,23 @@
 use strictures 1;
 use Object::Remote::Connector::STDIO;
 use Object::Remote;
+use CPS::Future;
 
 my $c = Object::Remote::Connector::STDIO->new->connect;
 
-Object::Remote->current_loop->run;
+$c->register_class_call_handler;
+
+$c->ready_future->done;
+
+my $loop = Object::Remote->current_loop;
+
+my $f = CPS::Future->new;
+
+$f->on_ready(sub { $loop->want_stop });
+
+$c->on_close($f);
+
+print { $c->send_to_fh } "Shere\n";
+
+$loop->want_run;
+$loop->run_while_wanted;