MsgPack::RPC::Message::Notification - a MessagePack-RPC request
version 2.0.1
use MsgPack::RPC; my $rpc = MsgPack::RPC->new( io => '127.0.0.1:6543' ); $rpc->emit( some_request => 'MsgPack::RPC::Message::Request', args => [ 1..5 ] );
Sub-class of MsgPack::RPC::Message representing an incoming request.
Accepts the same argument as MsgPack::RPC::Message, plus message_id, the id of the request.
message_id
Returns a Promises::Deferred that, once fulfilled, sends the response back with the provided arguments.
$rpc->subscribe( something => sub { my $request = shift; $request->response->resolve('a-okay'); });
Shortcut for
$request->response->resolve($args)
$request->response->reject($args)
Yanick Champoux <yanick@cpan.org>
This software is copyright (c) 2017, 2016, 2015 by Yanick Champoux.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MsgPack::RPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MsgPack::RPC
CPAN shell
perl -MCPAN -e shell install MsgPack::RPC
For more information on module installation, please visit the detailed CPAN module installation guide.