… | |
… | |
11 | |
11 | |
12 | AnyEvent::Handle - non-blocking I/O on file handles via AnyEvent |
12 | AnyEvent::Handle - non-blocking I/O on file handles via AnyEvent |
13 | |
13 | |
14 | =cut |
14 | =cut |
15 | |
15 | |
16 | our $VERSION = 4.9; |
16 | our $VERSION = 4.91; |
17 | |
17 | |
18 | =head1 SYNOPSIS |
18 | =head1 SYNOPSIS |
19 | |
19 | |
20 | use AnyEvent; |
20 | use AnyEvent; |
21 | use AnyEvent::Handle; |
21 | use AnyEvent::Handle; |
… | |
… | |
624 | |
624 | |
625 | sub timeout { |
625 | sub timeout { |
626 | my ($self, $timeout) = @_; |
626 | my ($self, $timeout) = @_; |
627 | |
627 | |
628 | $self->{timeout} = $timeout; |
628 | $self->{timeout} = $timeout; |
|
|
629 | delete $self->{_tw}; |
629 | $self->_timeout; |
630 | $self->_timeout; |
630 | } |
631 | } |
631 | |
632 | |
632 | # reset the timeout watcher, as neccessary |
633 | # reset the timeout watcher, as neccessary |
633 | # also check for time-outs |
634 | # also check for time-outs |
… | |
… | |
1732 | Net::SSLeay::CTX_set_mode ($tls, 1|2); |
1733 | Net::SSLeay::CTX_set_mode ($tls, 1|2); |
1733 | |
1734 | |
1734 | $self->{_rbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
1735 | $self->{_rbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
1735 | $self->{_wbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
1736 | $self->{_wbio} = Net::SSLeay::BIO_new (Net::SSLeay::BIO_s_mem ()); |
1736 | |
1737 | |
|
|
1738 | Net::SSLeay::BIO_write ($self->{_rbio}, delete $self->{rbuf}); |
|
|
1739 | |
1737 | Net::SSLeay::set_bio ($tls, $self->{_rbio}, $self->{_wbio}); |
1740 | Net::SSLeay::set_bio ($tls, $self->{_rbio}, $self->{_wbio}); |
1738 | |
1741 | |
1739 | $self->{_on_starttls} = sub { $_[0]{on_starttls}(@_) } |
1742 | $self->{_on_starttls} = sub { $_[0]{on_starttls}(@_) } |
1740 | if $self->{on_starttls}; |
1743 | if $self->{on_starttls}; |
1741 | |
1744 | |