1 | package AnyEvent::Handle; |
1 | package AnyEvent::Handle; |
2 | |
2 | |
3 | no warnings; |
|
|
4 | use strict qw(subs vars); |
|
|
5 | |
|
|
6 | use AnyEvent (); |
|
|
7 | use AnyEvent::Util qw(WSAEWOULDBLOCK); |
|
|
8 | use Scalar::Util (); |
3 | use Scalar::Util (); |
9 | use Carp (); |
4 | use Carp (); |
10 | use Fcntl (); |
|
|
11 | use Errno qw(EAGAIN EINTR); |
5 | use Errno qw(EAGAIN EINTR); |
12 | |
6 | |
|
|
7 | use AnyEvent (); BEGIN { AnyEvent::common_sense } |
|
|
8 | use AnyEvent::Util qw(WSAEWOULDBLOCK); |
|
|
9 | |
13 | =head1 NAME |
10 | =head1 NAME |
14 | |
11 | |
15 | AnyEvent::Handle - non-blocking I/O on file handles via AnyEvent |
12 | AnyEvent::Handle - non-blocking I/O on file handles via AnyEvent |
16 | |
13 | |
17 | =cut |
14 | =cut |
18 | |
15 | |
19 | our $VERSION = 4.82; |
16 | our $VERSION = 4.86; |
20 | |
17 | |
21 | =head1 SYNOPSIS |
18 | =head1 SYNOPSIS |
22 | |
19 | |
23 | use AnyEvent; |
20 | use AnyEvent; |
24 | use AnyEvent::Handle; |
21 | use AnyEvent::Handle; |
… | |
… | |
1640 | |
1637 | |
1641 | &_freetls; |
1638 | &_freetls; |
1642 | |
1639 | |
1643 | my $linger = exists $self->{linger} ? $self->{linger} : 3600; |
1640 | my $linger = exists $self->{linger} ? $self->{linger} : 3600; |
1644 | |
1641 | |
1645 | if ($linger && length $self->{wbuf}) { |
1642 | if ($linger && length $self->{wbuf} && $self->{fh}) { |
1646 | my $fh = delete $self->{fh}; |
1643 | my $fh = delete $self->{fh}; |
1647 | my $wbuf = delete $self->{wbuf}; |
1644 | my $wbuf = delete $self->{wbuf}; |
1648 | |
1645 | |
1649 | my @linger; |
1646 | my @linger; |
1650 | |
1647 | |