| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public License |
|
2
|
|
|
|
|
|
|
# or the Artistic License (the same terms as Perl itself) |
|
3
|
|
|
|
|
|
|
# |
|
4
|
|
|
|
|
|
|
# (C) Paul Evans, 2010-2024 -- leonerd@leonerd.org.uk |
|
5
|
|
|
|
|
|
|
|
|
6
|
9
|
|
|
9
|
|
141
|
use v5.26; |
|
|
9
|
|
|
|
|
42
|
|
|
7
|
9
|
|
|
9
|
|
58
|
use warnings; |
|
|
9
|
|
|
|
|
22
|
|
|
|
9
|
|
|
|
|
917
|
|
|
8
|
9
|
|
|
9
|
|
94
|
use Object::Pad 0.800; |
|
|
9
|
|
|
|
|
99
|
|
|
|
9
|
|
|
|
|
820
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
package Tangence::Server::Context 0.33; |
|
11
|
|
|
|
|
|
|
class Tangence::Server::Context; |
|
12
|
|
|
|
|
|
|
|
|
13
|
9
|
|
|
9
|
|
4510
|
use Carp; |
|
|
9
|
|
|
|
|
25
|
|
|
|
9
|
|
|
|
|
925
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
9
|
|
|
9
|
|
65
|
use Tangence::Constants; |
|
|
9
|
|
|
|
|
188
|
|
|
|
9
|
|
|
|
|
12206
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 NAME |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
C - server connection class for C |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
This module is a component of L. It is not intended for |
|
24
|
|
|
|
|
|
|
end-user use directly. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
|
27
|
|
|
|
|
|
|
|
|
28
|
23
|
|
|
23
|
0
|
144
|
field $stream :param :reader; |
|
|
23
|
|
|
|
|
218
|
|
|
29
|
|
|
|
|
|
|
field $token :param; |
|
30
|
|
|
|
|
|
|
|
|
31
|
95
|
|
|
|
|
171
|
sub BUILDARGS ( $class, $stream, $token ) |
|
|
95
|
|
|
|
|
190
|
|
|
32
|
95
|
|
|
95
|
0
|
224
|
{ |
|
|
95
|
|
|
|
|
153
|
|
|
|
95
|
|
|
|
|
177
|
|
|
33
|
95
|
|
|
|
|
859
|
return ( stream => $stream, token => $token ); |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
field $responded; |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# TODO: Object::Pad probably should do this bit |
|
39
|
|
|
|
|
|
|
method DESTROY |
|
40
|
|
|
|
|
|
|
{ |
|
41
|
|
|
|
|
|
|
$responded or croak "$self never responded"; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
95
|
|
|
95
|
0
|
183
|
method respond ( $message ) |
|
|
95
|
|
|
|
|
301
|
|
|
|
95
|
|
|
|
|
185
|
|
|
|
95
|
|
|
|
|
154
|
|
|
45
|
|
|
|
|
|
|
{ |
|
46
|
95
|
50
|
|
|
|
309
|
$responded and croak "$self has responded once already"; |
|
47
|
|
|
|
|
|
|
|
|
48
|
95
|
|
|
|
|
518
|
$stream->respond( $token, $message ); |
|
49
|
|
|
|
|
|
|
|
|
50
|
95
|
|
|
|
|
4737
|
$responded = 1; |
|
51
|
|
|
|
|
|
|
|
|
52
|
95
|
|
|
|
|
682
|
return; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
6
|
|
|
6
|
0
|
13
|
method responderr ( $msg ) |
|
|
6
|
|
|
|
|
15
|
|
|
|
6
|
|
|
|
|
13
|
|
|
|
6
|
|
|
|
|
11
|
|
|
56
|
|
|
|
|
|
|
{ |
|
57
|
6
|
|
|
|
|
13
|
chomp $msg; # In case of simple ->responderr( $@ ); |
|
58
|
|
|
|
|
|
|
|
|
59
|
6
|
|
|
|
|
33
|
$self->respond( Tangence::Message->new( $stream, MSG_ERROR ) |
|
60
|
|
|
|
|
|
|
->pack_str( $msg ) |
|
61
|
|
|
|
|
|
|
); |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 AUTHOR |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Paul Evans |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
0x55AA; |