line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ZMQ::Raw; |
2
|
|
|
|
|
|
|
$ZMQ::Raw::VERSION = '0.37'; |
3
|
14
|
|
|
14
|
|
839771
|
use strict; |
|
14
|
|
|
|
|
216
|
|
|
14
|
|
|
|
|
352
|
|
4
|
14
|
|
|
14
|
|
61
|
use warnings; |
|
14
|
|
|
|
|
18
|
|
|
14
|
|
|
|
|
372
|
|
5
|
14
|
|
|
14
|
|
95
|
use Carp; |
|
14
|
|
|
|
|
28
|
|
|
14
|
|
|
|
|
1040
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require XSLoader; |
8
|
|
|
|
|
|
|
XSLoader::load ('ZMQ::Raw', $ZMQ::Raw::VERSION); |
9
|
|
|
|
|
|
|
|
10
|
14
|
|
|
14
|
|
5042
|
use ZMQ::Raw::Context; |
|
14
|
|
|
|
|
30
|
|
|
14
|
|
|
|
|
379
|
|
11
|
14
|
|
|
14
|
|
4689
|
use ZMQ::Raw::Curve; |
|
14
|
|
|
|
|
59
|
|
|
14
|
|
|
|
|
319
|
|
12
|
14
|
|
|
14
|
|
5040
|
use ZMQ::Raw::Error; |
|
14
|
|
|
|
|
26
|
|
|
14
|
|
|
|
|
369
|
|
13
|
14
|
|
|
14
|
|
5505
|
use ZMQ::Raw::Loop; |
|
14
|
|
|
|
|
37
|
|
|
14
|
|
|
|
|
370
|
|
14
|
14
|
|
|
14
|
|
5629
|
use ZMQ::Raw::Message; |
|
14
|
|
|
|
|
30
|
|
|
14
|
|
|
|
|
380
|
|
15
|
14
|
|
|
14
|
|
5076
|
use ZMQ::Raw::Poller; |
|
14
|
|
|
|
|
28
|
|
|
14
|
|
|
|
|
344
|
|
16
|
14
|
|
|
14
|
|
4561
|
use ZMQ::Raw::Proxy; |
|
14
|
|
|
|
|
26
|
|
|
14
|
|
|
|
|
303
|
|
17
|
14
|
|
|
14
|
|
4912
|
use ZMQ::Raw::Socket; |
|
14
|
|
|
|
|
28
|
|
|
14
|
|
|
|
|
319
|
|
18
|
14
|
|
|
14
|
|
4934
|
use ZMQ::Raw::Timer; |
|
14
|
|
|
|
|
30
|
|
|
14
|
|
|
|
|
321
|
|
19
|
14
|
|
|
14
|
|
4534
|
use ZMQ::Raw::Z85; |
|
14
|
|
|
|
|
25
|
|
|
14
|
|
|
|
|
1151
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub AUTOLOAD |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
# This AUTOLOAD is used to 'autoload' constants from the constant() |
24
|
|
|
|
|
|
|
# XS function. |
25
|
|
|
|
|
|
|
|
26
|
66
|
|
|
66
|
|
36627
|
my $constname; |
27
|
66
|
|
|
|
|
107
|
our $AUTOLOAD; |
28
|
66
|
|
|
|
|
373
|
($constname = $AUTOLOAD) =~ s/.*:://; |
29
|
66
|
50
|
|
|
|
189
|
croak "&ZMQ::Raw::_constant not defined" if $constname eq '_constant'; |
30
|
66
|
|
|
|
|
336
|
my ($error, $val) = _constant ($constname); |
31
|
66
|
50
|
|
|
|
146
|
if ($error) { croak $error; } |
|
0
|
|
|
|
|
0
|
|
32
|
|
|
|
|
|
|
{ |
33
|
14
|
|
|
14
|
|
95
|
no strict 'refs'; |
|
14
|
|
|
|
|
22
|
|
|
14
|
|
|
|
|
1157
|
|
|
66
|
|
|
|
|
101
|
|
34
|
66
|
|
|
369
|
|
355
|
*$AUTOLOAD = sub { $val }; |
|
369
|
|
|
|
|
1009521
|
|
35
|
|
|
|
|
|
|
} |
36
|
66
|
|
|
|
|
201
|
goto &$AUTOLOAD; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=for HTML |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 NAME |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
ZMQ::Raw - Perl bindings to the ZeroMQ library |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 VERSION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
version 0.37 |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 SYNOPSIS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
use ZMQ::Raw; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
my $ctx = ZMQ::Raw::Context->new; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my $responder = ZMQ::Raw::Socket->new ($ctx, ZMQ::Raw->ZMQ_REP); |
66
|
|
|
|
|
|
|
$responder->bind ('tcp://*:5555'); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
my $requestor = ZMQ::Raw::Socket->new ($ctx, ZMQ::Raw->ZMQ_REQ); |
69
|
|
|
|
|
|
|
$requestor->connect ('tcp://localhost:5555'); |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# prints: Request 'hello' |
72
|
|
|
|
|
|
|
$requestor->send ('hello'); |
73
|
|
|
|
|
|
|
print "Request '", $responder->recv(), "'\n"; |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
# prints: Response 'world' |
76
|
|
|
|
|
|
|
$responder->send ('world'); |
77
|
|
|
|
|
|
|
print "Response '", $requestor->recv(), "'\n"; |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 METHODS |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 has( $feature ) |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Check if C<$feature> is available. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 CONSTANTS |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head2 ZMQ_PAIR |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head2 ZMQ_PUB |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 ZMQ_SUB |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 ZMQ_REQ |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 ZMQ_REP |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head2 ZMQ_DEALER |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 ZMQ_ROUTER |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 ZMQ_PULL |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head2 ZMQ_PUSH |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head2 ZMQ_XPUB |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head2 ZMQ_XSUB |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 ZMQ_STREAM |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=head2 ZMQ_SERVER |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 ZMQ_CLIENT |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=head2 ZMQ_RADIO |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head2 ZMQ_DISH |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head2 ZMQ_GATHER |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 ZMQ_SCATTER |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head2 ZMQ_DGRAM |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head2 ZMQ_DONTWAIT |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 ZMQ_SNDMORE |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 ZMQ_POLLIN |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head2 ZMQ_POLLOUT |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head2 ZMQ_POLLERR |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=head2 ZMQ_POLLPRI |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head2 ZMQ_IO_THREADS |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 ZMQ_MAX_SOCKETS |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=head2 ZMQ_SOCKET_LIMIT |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head2 ZMQ_THREAD_PRIORITY |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
=head2 ZMQ_THREAD_SCHED_POLICY |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=head2 ZMQ_MAX_MSGSZ |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
=head2 ZMQ_MSG_T_SIZE |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head2 ZMQ_THREAD_AFFINITY |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
=head2 ZMQ_THREAD_NAME_PREFIX |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_CONNECTED |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_CONNECT_DELAYED |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_CONNECT_RETRIED |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_LISTENING |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_BIND_FAILED |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_ACCEPTED |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_ACCEPT_FAILED |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_CLOSED |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_CLOSE_FAILED |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_DISCONNECTED |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_MONITOR_STOPPED |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_ALL |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_HANDSHAKE_SUCCEEDED |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head2 ZMQ_EVENT_HANDSHAKE_FAILED_AUTH |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=head2 FEATURE_IPC |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=head2 FEATURE_PGM |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head2 FEATURE_TIPC |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=head2 FEATURE_NORM |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=head2 FEATURE_CURVE |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=head2 FEATURE_GSSAPI |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=head2 FEATURE_DRAFT |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=head1 AUTHOR |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
Jacques Germishuys |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
Copyright 2017 Jacques Germishuys. |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
210
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
211
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
=cut |
216
|
|
|
|
|
|
|
|
217
|
|
|
|
|
|
|
1; # End of ZMQ::Raw |