line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MsgPack::RPC::Message; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:YANICK'; |
3
|
|
|
|
|
|
|
# ABSTRACT: a MessagePack-RPC notification |
4
|
|
|
|
|
|
|
$MsgPack::RPC::Message::VERSION = '2.0.2'; |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
17
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
20
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
0
|
21
|
sub is_response { 0 } |
9
|
1
|
|
|
1
|
0
|
21
|
sub is_request { 0 } |
10
|
0
|
|
|
0
|
0
|
|
sub is_notification { 0 } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
1; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
__END__ |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=pod |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=encoding UTF-8 |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 NAME |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
MsgPack::RPC::Message - a MessagePack-RPC notification |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 VERSION |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
version 2.0.2 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 SYNOPSIS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
use MsgPack::RPC; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $rpc = MsgPack::RPC->new( io => '127.0.0.1:6543' ); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$rpc->emit( some_notification => 'MsgPack::RPC::Message', args => [ 1..5 ] ); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
C<MsgPack::RPC::Message> extends the L<Beam::Event> class, and encapsulates a notification received by |
40
|
|
|
|
|
|
|
the L<MsgPack::RPC> object. Requests are encapsulated by the sub-class L<MsgPack::RPC::Message::Request>. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 METHODS |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 new( args => $args ) |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
The constructor accepts a single argument, C<args>, which is the struct |
47
|
|
|
|
|
|
|
holding the arguments of the notification itself. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SEE ALSO |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=over |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item L<MsgPack::RPC::Message::Request> - subclass for requests. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=back |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Yanick Champoux <yanick@cpan.org> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This software is copyright (c) 2019, 2017, 2016, 2015 by Yanick Champoux. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
66
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |