line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ZMQ::Raw; |
2
|
|
|
|
|
|
|
$ZMQ::Raw::VERSION = '0.39'; |
3
|
14
|
|
|
14
|
|
966193
|
use strict; |
|
14
|
|
|
|
|
147
|
|
|
14
|
|
|
|
|
431
|
|
4
|
14
|
|
|
14
|
|
75
|
use warnings; |
|
14
|
|
|
|
|
24
|
|
|
14
|
|
|
|
|
378
|
|
5
|
14
|
|
|
14
|
|
79
|
use Carp; |
|
14
|
|
|
|
|
27
|
|
|
14
|
|
|
|
|
1256
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require XSLoader; |
8
|
|
|
|
|
|
|
XSLoader::load ('ZMQ::Raw', $ZMQ::Raw::VERSION); |
9
|
|
|
|
|
|
|
|
10
|
14
|
|
|
14
|
|
6040
|
use ZMQ::Raw::Context; |
|
14
|
|
|
|
|
36
|
|
|
14
|
|
|
|
|
364
|
|
11
|
14
|
|
|
14
|
|
5829
|
use ZMQ::Raw::Curve; |
|
14
|
|
|
|
|
47
|
|
|
14
|
|
|
|
|
372
|
|
12
|
14
|
|
|
14
|
|
5873
|
use ZMQ::Raw::Error; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
371
|
|
13
|
14
|
|
|
14
|
|
6374
|
use ZMQ::Raw::Loop; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
450
|
|
14
|
14
|
|
|
14
|
|
6085
|
use ZMQ::Raw::Message; |
|
14
|
|
|
|
|
46
|
|
|
14
|
|
|
|
|
406
|
|
15
|
14
|
|
|
14
|
|
5890
|
use ZMQ::Raw::Poller; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
362
|
|
16
|
14
|
|
|
14
|
|
5679
|
use ZMQ::Raw::Proxy; |
|
14
|
|
|
|
|
33
|
|
|
14
|
|
|
|
|
373
|
|
17
|
14
|
|
|
14
|
|
6048
|
use ZMQ::Raw::Socket; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
430
|
|
18
|
14
|
|
|
14
|
|
5867
|
use ZMQ::Raw::Timer; |
|
14
|
|
|
|
|
31
|
|
|
14
|
|
|
|
|
400
|
|
19
|
14
|
|
|
14
|
|
5827
|
use ZMQ::Raw::Z85; |
|
14
|
|
|
|
|
33
|
|
|
14
|
|
|
|
|
1401
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub AUTOLOAD |
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
# This AUTOLOAD is used to 'autoload' constants from the constant() |
24
|
|
|
|
|
|
|
# XS function. |
25
|
|
|
|
|
|
|
|
26
|
69
|
|
|
69
|
|
60393
|
my $constname; |
27
|
69
|
|
|
|
|
110
|
our $AUTOLOAD; |
28
|
69
|
|
|
|
|
443
|
($constname = $AUTOLOAD) =~ s/.*:://; |
29
|
69
|
50
|
|
|
|
231
|
croak "&ZMQ::Raw::_constant not defined" if $constname eq '_constant'; |
30
|
69
|
|
|
|
|
393
|
my ($error, $val) = _constant ($constname); |
31
|
69
|
50
|
|
|
|
164
|
if ($error) { croak $error; } |
|
0
|
|
|
|
|
0
|
|
32
|
|
|
|
|
|
|
{ |
33
|
14
|
|
|
14
|
|
105
|
no strict 'refs'; |
|
14
|
|
|
|
|
26
|
|
|
14
|
|
|
|
|
1403
|
|
|
69
|
|
|
|
|
98
|
|
34
|
69
|
|
|
372
|
|
436
|
*$AUTOLOAD = sub { $val }; |
|
372
|
|
|
|
|
1011620
|
|
35
|
|
|
|
|
|
|
} |
36
|
69
|
|
|
|
|
251
|
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.39 |
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 |