line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ZMQ::Raw; |
2
|
|
|
|
|
|
|
$ZMQ::Raw::VERSION = '0.38'; |
3
|
14
|
|
|
14
|
|
974059
|
use strict; |
|
14
|
|
|
|
|
149
|
|
|
14
|
|
|
|
|
425
|
|
4
|
14
|
|
|
14
|
|
74
|
use warnings; |
|
14
|
|
|
|
|
25
|
|
|
14
|
|
|
|
|
378
|
|
5
|
14
|
|
|
14
|
|
70
|
use Carp; |
|
14
|
|
|
|
|
32
|
|
|
14
|
|
|
|
|
1339
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require XSLoader; |
8
|
|
|
|
|
|
|
XSLoader::load ('ZMQ::Raw', $ZMQ::Raw::VERSION); |
9
|
|
|
|
|
|
|
|
10
|
14
|
|
|
14
|
|
6094
|
use ZMQ::Raw::Context; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
389
|
|
11
|
14
|
|
|
14
|
|
5631
|
use ZMQ::Raw::Curve; |
|
14
|
|
|
|
|
39
|
|
|
14
|
|
|
|
|
372
|
|
12
|
14
|
|
|
14
|
|
6122
|
use ZMQ::Raw::Error; |
|
14
|
|
|
|
|
34
|
|
|
14
|
|
|
|
|
377
|
|
13
|
14
|
|
|
14
|
|
6277
|
use ZMQ::Raw::Loop; |
|
14
|
|
|
|
|
34
|
|
|
14
|
|
|
|
|
430
|
|
14
|
14
|
|
|
14
|
|
6010
|
use ZMQ::Raw::Message; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
410
|
|
15
|
14
|
|
|
14
|
|
5946
|
use ZMQ::Raw::Poller; |
|
14
|
|
|
|
|
34
|
|
|
14
|
|
|
|
|
393
|
|
16
|
14
|
|
|
14
|
|
5893
|
use ZMQ::Raw::Proxy; |
|
14
|
|
|
|
|
37
|
|
|
14
|
|
|
|
|
373
|
|
17
|
14
|
|
|
14
|
|
5939
|
use ZMQ::Raw::Socket; |
|
14
|
|
|
|
|
36
|
|
|
14
|
|
|
|
|
388
|
|
18
|
14
|
|
|
14
|
|
5734
|
use ZMQ::Raw::Timer; |
|
14
|
|
|
|
|
30
|
|
|
14
|
|
|
|
|
443
|
|
19
|
14
|
|
|
14
|
|
5666
|
use ZMQ::Raw::Z85; |
|
14
|
|
|
|
|
31
|
|
|
14
|
|
|
|
|
1435
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub AUTOLOAD |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
# This AUTOLOAD is used to 'autoload' constants from the constant() |
24
|
|
|
|
|
|
|
# XS function. |
25
|
|
|
|
|
|
|
|
26
|
68
|
|
|
68
|
|
41609
|
my $constname; |
27
|
68
|
|
|
|
|
100
|
our $AUTOLOAD; |
28
|
68
|
|
|
|
|
439
|
($constname = $AUTOLOAD) =~ s/.*:://; |
29
|
68
|
50
|
|
|
|
233
|
croak "&ZMQ::Raw::_constant not defined" if $constname eq '_constant'; |
30
|
68
|
|
|
|
|
391
|
my ($error, $val) = _constant ($constname); |
31
|
68
|
50
|
|
|
|
171
|
if ($error) { croak $error; } |
|
0
|
|
|
|
|
0
|
|
32
|
|
|
|
|
|
|
{ |
33
|
14
|
|
|
14
|
|
119
|
no strict 'refs'; |
|
14
|
|
|
|
|
25
|
|
|
14
|
|
|
|
|
1413
|
|
|
68
|
|
|
|
|
99
|
|
34
|
68
|
|
|
371
|
|
436
|
*$AUTOLOAD = sub { $val }; |
|
371
|
|
|
|
|
1012222
|
|
35
|
|
|
|
|
|
|
} |
36
|
68
|
|
|
|
|
243
|
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.38 |
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 |