line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2011-2020 by [Mark Overmeer ]. |
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.02. |
5
|
|
|
|
|
|
|
# This code is part of distribution IOMux. Meta-POD processed with OODoc |
6
|
|
|
|
|
|
|
# into POD and HTML manual-pages. See README.md |
7
|
|
|
|
|
|
|
# Copyright Mark Overmeer. Licensed under the same terms as Perl itself. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package IOMux::Handler::Service; |
10
|
1
|
|
|
1
|
|
693
|
use vars '$VERSION'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
11
|
|
|
|
|
|
|
$VERSION = '1.01'; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
4
|
use base 'IOMux::Handler'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
70
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
18
|
|
16
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
4
|
use Log::Report 'iomux'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub muxInit($) |
22
|
0
|
|
|
0
|
1
|
|
{ my ($self, $mux) = @_; |
23
|
0
|
|
|
|
|
|
$self->SUPER::muxInit($mux); |
24
|
0
|
|
|
|
|
|
$self->fdset(1, 1, 0, 0); # 'read' new connections |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub muxRemove() |
28
|
0
|
|
|
0
|
1
|
|
{ my $self = shift; |
29
|
0
|
|
|
|
|
|
$self->SUPER::muxRemove; |
30
|
0
|
|
|
|
|
|
$self->fdset(0, 1, 0, 0); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#---------- |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
1
|
|
sub muxConnection($) {shift} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |