line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# ABSTRACT: Perl wrapper around Wslay websocket library
|
2
|
|
|
|
|
|
|
package Net::WebSocket::EVx;
|
3
|
1
|
|
|
1
|
|
135027
|
use strict; use warnings;
|
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
688
|
use EV ();
|
|
1
|
|
|
|
|
2544
|
|
|
1
|
|
|
|
|
27
|
|
5
|
1
|
|
|
1
|
|
6
|
use XSLoader ();
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
6
|
|
|
|
|
|
|
our $VERSION;
|
7
|
|
|
|
|
|
|
BEGIN {
|
8
|
1
|
|
|
1
|
|
3
|
$VERSION = '0.16';
|
9
|
1
|
|
|
|
|
585
|
XSLoader::load(__PACKAGE__, $VERSION);
|
10
|
|
|
|
|
|
|
}
|
11
|
1
|
|
|
1
|
|
9
|
use constant { WS_FRAGMENTED_EOF => 0, WS_FRAGMENTED_ERROR => -1, WS_FRAGMENTED_DATA => 1 };
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
142
|
|
12
|
1
|
|
|
1
|
|
7
|
use Exporter 'import';
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
246
|
|
13
|
|
|
|
|
|
|
our @EXPORT = qw/WS_FRAGMENTED_EOF WS_FRAGMENTED_ERROR WS_FRAGMENTED_NODATA/;
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new {
|
16
|
2
|
|
|
2
|
1
|
3066
|
my (undef, $self) = @_;
|
17
|
2
|
|
100
|
|
|
12
|
$self->{buffering} //= 1;
|
18
|
2
|
|
100
|
|
|
8
|
$self->{type} //= 'server';
|
19
|
2
|
|
33
|
|
|
63
|
_wslay_event_context_init($self, ($self->{fd} // fileno($self->{fh})), int($self->{type} eq 'server'));
|
20
|
2
|
|
|
|
|
11
|
_wslay_event_config_set_no_buffering($self, int(!$self->{buffering}));
|
21
|
2
|
50
|
|
|
|
6
|
_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;
|