line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: Perl wrapper around Wslay websocket library |
2
|
|
|
|
|
|
|
package Net::WebSocket::EVx; |
3
|
1
|
|
|
1
|
|
130867
|
use strict; use warnings; |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
4
|
1
|
|
|
1
|
|
696
|
use EV (); |
|
1
|
|
|
|
|
2582
|
|
|
1
|
|
|
|
|
26
|
|
5
|
1
|
|
|
1
|
|
8
|
use XSLoader (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
6
|
|
|
|
|
|
|
our $VERSION; |
7
|
|
|
|
|
|
|
BEGIN { |
8
|
1
|
|
|
1
|
|
3
|
$VERSION = '0.17'; |
9
|
1
|
|
|
|
|
581
|
XSLoader::load(__PACKAGE__, $VERSION); |
10
|
|
|
|
|
|
|
} |
11
|
1
|
|
|
1
|
|
8
|
use constant { WS_FRAGMENTED_EOF => 0, WS_FRAGMENTED_ERROR => -1, WS_FRAGMENTED_DATA => 1 }; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
136
|
|
12
|
1
|
|
|
1
|
|
7
|
use Exporter 'import'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
255
|
|
13
|
|
|
|
|
|
|
our @EXPORT = qw/WS_FRAGMENTED_EOF WS_FRAGMENTED_ERROR WS_FRAGMENTED_NODATA/; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
2
|
|
|
2
|
1
|
3225
|
my (undef, $self) = @_; |
17
|
2
|
100
|
|
|
|
9
|
$self->{buffering} = 1 unless defined $self->{buffering}; |
18
|
2
|
100
|
|
|
|
8
|
$self->{type} = 'server' unless defined $self->{type}; |
19
|
2
|
|
33
|
|
|
75
|
_wslay_event_context_init($self, ($self->{fd} // fileno($self->{fh})), int($self->{type} eq 'server')); |
20
|
2
|
|
|
|
|
13
|
_wslay_event_config_set_no_buffering($self, int(!$self->{buffering})); |
21
|
2
|
50
|
|
|
|
7
|
_wslay_event_config_set_max_recv_msg_length($self, $self->{max_recv_size}) if defined $self->{max_recv_size}; |
22
|
2
|
|
|
|
|
34
|
bless $self |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
0
|
|
0
|
1
|
|
sub wait { if ($_[1]) { $_[0]->_set_waiter($_[1]) } } |
|
0
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |